[Groonga-commit] droonga/express-droonga at 24afa1f [master] Group tests for "not cached" cases

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Mar 20 17:59:26 JST 2014


YUKI Hiroshi	2014-03-20 17:59:26 +0900 (Thu, 20 Mar 2014)

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

  Message:
    Group tests for "not cached" cases

  Modified files:
    test/response-cache/middleware.test.js

  Modified: test/response-cache/middleware.test.js (+17 -15)
===================================================================
--- test/response-cache/middleware.test.js    2014-03-20 17:58:15 +0900 (86277f7)
+++ test/response-cache/middleware.test.js    2014-03-20 17:59:26 +0900 (3014cbc)
@@ -41,18 +41,6 @@ suite('Response Cache Middleware', function() {
     }
   }
 
-  test('not yet cached', function(done) {
-    client(application)
-      .get('/cached/success')
-      .expect(200)
-      .end(function(error, response){
-        if (error)
-          return done(error);
-        else
-          assertNotCached(response, done);
-      });
-  });
-
   test('cached', function(done) {
     client(application)
       .get('/cached/success')
@@ -74,7 +62,20 @@ suite('Response Cache Middleware', function() {
       });
   });
 
-  test('never cached: error response', function(done) {
+  suite('not cached', function() {
+  test('initial access', function(done) {
+    client(application)
+      .get('/cached/success')
+      .expect(200)
+      .end(function(error, response){
+        if (error)
+          return done(error);
+        else
+          assertNotCached(response, done);
+      });
+  });
+
+  test('error response', function(done) {
     client(application)
       .get('/cached/fail')
       .expect(400)
@@ -94,7 +95,7 @@ suite('Response Cache Middleware', function() {
       });
   });
 
-  test('never cached: not matched', function(done) {
+  test('not matched', function(done) {
     client(application)
       .get('/fresh')
       .expect(200)
@@ -114,7 +115,7 @@ suite('Response Cache Middleware', function() {
       });
   });
 
-  test('never cached: not GET method', function(done) {
+  test('not GET method', function(done) {
     client(application)
       .post('/cached/post')
       .send('OK')
@@ -135,5 +136,6 @@ suite('Response Cache Middleware', function() {
           });
       });
   });
+  });
 });
 
-------------- next part --------------
HTML����������������������������...
Download 



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