YUKI Hiroshi
null+****@clear*****
Thu Dec 26 12:03:13 JST 2013
YUKI Hiroshi 2013-12-26 12:03:13 +0900 (Thu, 26 Dec 2013) New Revision: eb6dbe97a37679c2aefff7ab9971f2afb6d69a1f https://github.com/droonga/fluent-plugin-droonga/commit/eb6dbe97a37679c2aefff7ab9971f2afb6d69a1f Message: Add a test of the "add" command for a request without "key" Modified files: test/unit/plugin/handler/test_add.rb Modified: test/unit/plugin/handler/test_add.rb (+10 -0) =================================================================== --- test/unit/plugin/handler/test_add.rb 2013-12-26 12:00:57 +0900 (3def810) +++ test/unit/plugin/handler/test_add.rb 2013-12-26 12:03:13 +0900 (d71c405) @@ -81,6 +81,16 @@ class AddHandlerTest < Test::Unit::TestCase table =****@worke*****["Users"] assert_equal(["japan"], table.collect(&:country)) end + + def test_missing_key_parameter + request = { + "table" => "Users", + "values" => {"country" => "japan"}, + } + assert_raise(Droonga::AddHandler::MissingPrimaryKey) do + process(request) + end + end end class NoKeyTest < self -------------- next part -------------- HTML����������������������������... 下载