YUKI Hiroshi
null+****@clear*****
Thu Feb 7 17:34:21 JST 2013
YUKI Hiroshi 2013-02-07 17:34:21 +0900 (Thu, 07 Feb 2013) New Revision: babe86d2956ac8624689a2b5c2c6928b5fa72306 https://github.com/groonga/express-kotoumi/commit/babe86d2956ac8624689a2b5c2c6928b5fa72306 Log: test: Update tests for new plugin spec Modified files: test/frontend-rest-adaptor.test.js test/frontend-socket.io-adaptor.test.js Modified: test/frontend-rest-adaptor.test.js (+5 -5) =================================================================== --- test/frontend-rest-adaptor.test.js 2013-02-07 17:33:30 +0900 (117566b) +++ test/frontend-rest-adaptor.test.js 2013-02-07 17:34:21 +0900 (f6f7ea6) @@ -64,15 +64,15 @@ suite('REST API', function() { }; }); assert.deepEqual(registeredCommands, - [{ command: 'search', + [{ name: 'search', definition: restCommands.search }, - { command: 'getCommand', + { name: 'getCommand', definition: basePlugin.getCommand }, - { command: 'putCommand', + { name: 'putCommand', definition: basePlugin.putCommand }, - { command: 'postCommand', + { name: 'postCommand', definition: overridingPlugin.postCommand }, - { command: 'deleteCommand', + { name: 'deleteCommand', definition: overridingPlugin.deleteCommand }]); }); Modified: test/frontend-socket.io-adaptor.test.js (+8 -8) =================================================================== --- test/frontend-socket.io-adaptor.test.js 2013-02-07 17:33:30 +0900 (a504d8f) +++ test/frontend-socket.io-adaptor.test.js 2013-02-07 17:34:21 +0900 (5853a45) @@ -63,15 +63,15 @@ suite('Socket.IO API', function() { }; }); assert.deepEqual(registeredCommands, - [{ command: 'search', + [{ name: 'search', definition: scoketIoCommands.search }, - { command: 'getCommand', + { name: 'getCommand', definition: basePlugin.getCommand }, - { command: 'putCommand', + { name: 'putCommand', definition: basePlugin.putCommand }, - { command: 'postCommand', + { name: 'postCommand', definition: overridingPlugin.postCommand }, - { command: 'deleteCommand', + { name: 'deleteCommand', definition: overridingPlugin.deleteCommand }]); done(); }) @@ -176,7 +176,7 @@ suite('Socket.IO API', function() { statusCode: 200, body: { searchResult: true} }; - connection.controllers.message.trigger(envelope); + connection.controllers.search.trigger(envelope); }) .wait(0.01) .next(function() { @@ -266,7 +266,7 @@ suite('Socket.IO API', function() { .wait(0.01) .next(function() { connection.assertThrows(); - connection.controllers.message.trigger({ + connection.controllers.builder.trigger({ statusCode: 200, type: 'builder.result', body: { responseMessage: true } @@ -315,7 +315,7 @@ suite('Socket.IO API', function() { .wait(0.01) .next(function() { connection.assertThrows(); - connection.controllers.message.trigger({ + connection.controllers.customevent.trigger({ statusCode: 200, type: 'customevent.result', body: { responseMessage: true } -------------- next part -------------- HTML����������������������������...Download