[Groonga-commit] droonga/express-droonga at c023fd8 [master] test: Add tests for ".json" suffix

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Apr 28 12:08:54 JST 2014


YUKI Hiroshi	2014-04-28 12:08:54 +0900 (Mon, 28 Apr 2014)

  New Revision: c023fd80759f5a019c440c96e8f7d04d34b9ceeb
  https://github.com/droonga/express-droonga/commit/c023fd80759f5a019c440c96e8f7d04d34b9ceeb

  Message:
    test: Add tests for ".json" suffix

  Modified files:
    test/adapter/api/groonga/load.test.js

  Modified: test/adapter/api/groonga/load.test.js (+32 -0)
===================================================================
--- test/adapter/api/groonga/load.test.js    2014-04-28 12:06:19 +0900 (362dc72)
+++ test/adapter/api/groonga/load.test.js    2014-04-28 12:08:54 +0900 (263591c)
@@ -62,6 +62,38 @@ suite('adapter/api/groonga: load', function() {
   };
 
   suite('success', function() {
+    suite('URL suffix', function() {
+      test('nothing', function(done) {
+        pushSuccessResponse();
+        var body = [
+        ]
+        utils.post('/d/load?table=Users', JSON.stringify(body))
+          .next(function(response) {
+            try {
+              assert.deepEqual(response.statusCode, 200);
+              done();
+            } catch (error) {
+              done(error);
+            }
+          });
+      });
+
+      test('.json', function(done) {
+        pushSuccessResponse();
+        var body = [
+        ]
+        utils.post('/d/load.json?table=Users', JSON.stringify(body))
+          .next(function(response) {
+            try {
+              assert.deepEqual(response.statusCode, 200);
+              done();
+            } catch (error) {
+              done(error);
+            }
+          });
+      });
+    });
+
     suite('HTTP header', function() {
       test('status code', function(done) {
         pushSuccessResponse();
-------------- next part --------------
HTML����������������������������...
Download 



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