YUKI Hiroshi
null+****@clear*****
Thu Dec 26 18:58:11 JST 2013
YUKI Hiroshi 2013-12-26 18:58:11 +0900 (Thu, 26 Dec 2013) New Revision: 825a6566460d2ba9f2b43bbd967fcc44fc1bc18c https://github.com/droonga/fluent-plugin-droonga/commit/825a6566460d2ba9f2b43bbd967fcc44fc1bc18c Message: "add" comand shuld return a simple boolean value as the response body Modified files: test/command/suite/add/minimum.expected test/command/suite/add/with-values.expected test/command/suite/add/without-key.expected test/unit/plugin/handler/test_add.rb Modified: test/command/suite/add/minimum.expected (+1 -3) =================================================================== --- test/command/suite/add/minimum.expected 2013-12-26 18:54:40 +0900 (3216089) +++ test/command/suite/add/minimum.expected 2013-12-26 18:58:11 +0900 (126b9a3) @@ -5,8 +5,6 @@ "inReplyTo": null, "statusCode": 200, "type": "add.result", - "body": [ - true - ] + "body": true } ] Modified: test/command/suite/add/with-values.expected (+1 -3) =================================================================== --- test/command/suite/add/with-values.expected 2013-12-26 18:54:40 +0900 (3216089) +++ test/command/suite/add/with-values.expected 2013-12-26 18:58:11 +0900 (126b9a3) @@ -5,8 +5,6 @@ "inReplyTo": null, "statusCode": 200, "type": "add.result", - "body": [ - true - ] + "body": true } ] Modified: test/command/suite/add/without-key.expected (+1 -3) =================================================================== --- test/command/suite/add/without-key.expected 2013-12-26 18:54:40 +0900 (3216089) +++ test/command/suite/add/without-key.expected 2013-12-26 18:58:11 +0900 (126b9a3) @@ -5,8 +5,6 @@ "inReplyTo": null, "statusCode": 200, "type": "add.result", - "body": [ - true - ] + "body": true } ] Modified: test/unit/plugin/handler/test_add.rb (+6 -4) =================================================================== --- test/unit/plugin/handler/test_add.rb 2013-12-26 18:54:40 +0900 (9cb8758) +++ test/unit/plugin/handler/test_add.rb 2013-12-26 18:58:11 +0900 (655281d) @@ -16,6 +16,8 @@ require "droonga/plugin/handler/add" class AddHandlerTest < Test::Unit::TestCase + SUCCESS_RESPONSE_BODY = true + def setup setup_database setup_schema @@ -67,7 +69,7 @@ class AddHandlerTest < Test::Unit::TestCase "values" => {}, } process(request) - assert_equal([[true]], @messenger.values) + assert_equal([SUCCESS_RESPONSE_BODY], @messenger.values) table =****@worke*****["Users"] assert_equal(["mori"], table.collect(&:key)) end @@ -79,7 +81,7 @@ class AddHandlerTest < Test::Unit::TestCase "values" => {"country" => "japan"}, } process(request) - assert_equal([[true]], @messenger.values) + assert_equal([SUCCESS_RESPONSE_BODY], @messenger.values) table =****@worke*****["Users"] assert_equal(["japan"], table.collect(&:country)) end @@ -144,7 +146,7 @@ class AddHandlerTest < Test::Unit::TestCase "values" => {}, } process(request) - assert_equal([[true]], @messenger.values) + assert_equal([SUCCESS_RESPONSE_BODY], @messenger.values) table =****@worke*****["Books"] assert_equal([nil], table.collect(&:title)) end @@ -155,7 +157,7 @@ class AddHandlerTest < Test::Unit::TestCase "values" => {"title" => "CSS"}, } process(request) - assert_equal([[true]], @messenger.values) + assert_equal([SUCCESS_RESPONSE_BODY], @messenger.values) table =****@worke*****["Books"] assert_equal(["CSS"], table.collect(&:title)) end -------------- next part -------------- HTML����������������������������... 다운로드