[Groonga-commit] groonga/express-kotoumi [master] test: Update definitions of test plugins for updated plugin spec

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Feb 7 19:31:53 JST 2013


YUKI Hiroshi	2013-02-07 19:31:53 +0900 (Thu, 07 Feb 2013)

  New Revision: 18a078ea6b1cb5de119f8f198591661d3a8abb1b
  https://github.com/groonga/express-kotoumi/commit/18a078ea6b1cb5de119f8f198591661d3a8abb1b

  Log:
    test: Update definitions of test plugins for updated plugin spec

  Modified files:
    test/frontend-rest-adaptor.test.js

  Modified: test/frontend-rest-adaptor.test.js (+8 -14)
===================================================================
--- test/frontend-rest-adaptor.test.js    2013-02-07 19:31:27 +0900 (949479f)
+++ test/frontend-rest-adaptor.test.js    2013-02-07 19:31:53 +0900 (ea32c4c)
@@ -14,36 +14,30 @@ suite('REST API', function() {
   test('registeration of plugin commands', function() {
     var basePlugin = {
       getCommand: new model.REST({
-        path: '/get',
-        toBackend: function() {}
+        path: '/get'
       }),
       putCommand: new model.REST({
         method: 'PUT',
-        path: '/put',
-        toBackend: function() {}
+        path: '/put'
       }),
       postCommand: new model.REST({
         method: 'POST',
-        path: '/post',
-        toBackend: function() {}
+        path: '/post'
       }),
       deleteCommand: new model.REST({
         method: 'DELETE',
-        path: '/delete',
-        toBackend: function() {}
+        path: '/delete'
       }),
       ignored: new model.SocketCommand()
     };
     var overridingPlugin = {
       postCommand: new model.REST({
         method: 'POST',
-        path: '/post/overridden',
-        toBackend: function() {}
+        path: '/post/overridden'
       }),
       deleteCommand: new model.REST({
         method: 'DELETE',
-        path: '/delete/overridden',
-        toBackend: function() {}
+        path: '/delete/overridden'
       })
     };
 
@@ -80,8 +74,8 @@ suite('REST API', function() {
     var testPlugin = {
       api: new model.REST({
         path: '/path/to/api',
-        toBackend: function() { return 'api requested'; },
-        toClient: function() { return 'api OK'; }
+        toBackend: function(event, request) { return [event, 'api requested']; },
+        toClient: function(event, data) { return [event, 'api OK']; }
       })
     };
 
-------------- next part --------------
HTML����������������������������...
Download 



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