[Groonga-commit] groonga/gcs [master] Fix expected error response for invalid version number

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Nov 5 16:06:12 JST 2012


YUKI Hiroshi	2012-11-05 16:06:12 +0900 (Mon, 05 Nov 2012)

  New Revision: 174087897dc58394b3f1348c00659a0918e08d36
  https://github.com/groonga/gcs/commit/174087897dc58394b3f1348c00659a0918e08d36

  Log:
    Fix expected error response for invalid version number

  Modified files:
    test/api-configuration.test.js

  Modified: test/api-configuration.test.js (+6 -11)
===================================================================
--- test/api-configuration.test.js    2012-11-05 16:05:44 +0900 (4d549c3)
+++ test/api-configuration.test.js    2012-11-05 16:06:12 +0900 (150172a)
@@ -57,18 +57,12 @@ suite('Configuration API', function() {
     assert.deepEqual(response.pattern,
                      { statusCode: 400,
                        body: xmlResponses.TYPED_ERROR_RESPONSE });
-    var expectedResponse = {
-          type: 'Sender',
-          code: 'ValidationError',
-          message: expectedMessage
+    var expectedError = {
+          Type: 'Sender',
+          Code: 'ValidationError',
+          Message: expectedMessage
         };
-    var error = response.body.Response.Errors.Error;
-    var actualResponse = {
-          type: error.Type,
-          code: error.Code,
-          message: error.Message
-        };
-    assert.deepEqual(actualResponse, expectedResponse);
+    assert.deepEqual(response.body.Response.Errors.Error, expectedError);
   }
 
   suite('domain operations', function() {
@@ -1078,6 +1072,7 @@ suite('Configuration API', function() {
                              body: xmlResponses.COMMON_ERROR_RESPONSE });
 
           var expectedError = {
+                Type: 'Sender',
                 Code: 'InvalidParameterValue',
                 Message: 'A bad or out-of-range value "2011-02-02" was supplied ' +
                          'for the "Version" input parameter.'
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index