[Groonga-commit] droonga/express-droonga at 356be69 [master] Add tests for Cache

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Mar 20 16:35:19 JST 2014


YUKI Hiroshi	2014-03-20 16:35:19 +0900 (Thu, 20 Mar 2014)

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

  Message:
    Add tests for Cache

  Added files:
    test/response-cache/cache.test.js

  Added: test/response-cache/cache.test.js (+27 -0) 100644
===================================================================
--- /dev/null
+++ test/response-cache/cache.test.js    2014-03-20 16:35:19 +0900 (9c0469f)
@@ -0,0 +1,27 @@
+var assert = require('chai').assert;
+
+var Cache = require('../../lib/response-cache/cache');
+
+suite('Response Cache', function() {
+  suite('required parameters', function() {
+    test('missing rules', function() {
+      assert.throw(function() {
+        var cache = new Cache({
+        });
+      }, Error);
+    });
+
+    test('not-array rules', function() {
+      assert.throw(function() {
+        var cache = new Cache({
+          rules: {
+            'foo' : {
+              ttl: 10
+            }
+          }
+        });
+      }, Error);
+    });
+  });
+});
+
-------------- next part --------------
HTML����������������������������...
Download 



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