YUKI Hiroshi
null+****@clear*****
Wed Jan 16 17:33:48 JST 2013
YUKI Hiroshi 2013-01-16 17:33:48 +0900 (Wed, 16 Jan 2013) New Revision: befb387e05cc75ac4cc5e6edcc13a37abc6829b7 https://github.com/groonga/express-kotoumi/commit/befb387e05cc75ac4cc5e6edcc13a37abc6829b7 Log: Give handlers factory correctly Modified files: test/rest-api.test.js Modified: test/rest-api.test.js (+7 -5) =================================================================== --- test/rest-api.test.js 2013-01-16 17:30:39 +0900 (c5943da) +++ test/rest-api.test.js 2013-01-16 17:33:48 +0900 (63dd1bf) @@ -50,10 +50,12 @@ suite('REST API', function() { setup(commonSetup); teardown(commonTeardown); - function createHandler(type) { - return function(request, response) { - response.write(type + 'OK'); - } + function createHandlerFactory(type) { + return function() { + return function(request, response) { + response.write(type + 'OK'); + }; + }; } test('to the document root', function(done) { @@ -62,7 +64,7 @@ suite('REST API', function() { prefix: '', connection: connection, handlers: { - search: createHandler('search') + search: createHandlerFactory('search') } }); server = utils.setupServer(application); -------------- next part -------------- HTML����������������������������... Descargar