[Groonga-commit] groonga/gcs [master] Compare synonym options as JSON object

Zurück zum Archiv-Index

null+****@clear***** null+****@clear*****
2012年 7月 18日 (水) 20:41:17 JST


SHIMODA Hiroshi	2012-07-18 20:41:17 +0900 (Wed, 18 Jul 2012)

  New Revision: 2517f1d3f5f3147ede01ace71e9dfdbb51fbd252
  https://github.com/groonga/gcs/commit/2517f1d3f5f3147ede01ace71e9dfdbb51fbd252

  Log:
    Compare synonym options as JSON object

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

  Modified: test/api-configuration.test.js (+8 -5)
===================================================================
--- test/api-configuration.test.js    2012-07-18 20:38:43 +0900 (7bfc4e9)
+++ test/api-configuration.test.js    2012-07-18 20:41:17 +0900 (990f182)
@@ -628,11 +628,14 @@ suite('Configuration API', function() {
         var synonymOptions = response.body.UpdateSynonymOptionsResponse
                                           .UpdateSynonymOptionsResult
                                           .Synonyms.Options;
-        assert.deepEqual('{"synonyms":' +
-                           '{"tokio":' +
-                             '["tokyo"],' +
-                              '"dekkaido":' +
-                                '"hokkaido"}}', synonymOptions);
+        synonymOptions = JSON.parse(synonymOptions);
+        var expectedSynonymOptions = {
+              synonyms: {
+                tokio: ['tokyo'],
+                dekkaido: 'hokkaido'
+              }
+            };
+        assert.deepEqual(expectedSynonymOptions, synonymOptions);
 
         done();
       })
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Zurück zum Archiv-Index