Kouhei Sutou
null+****@clear*****
Sun Feb 9 10:32:26 JST 2014
Kouhei Sutou 2014-02-09 10:32:26 +0900 (Sun, 09 Feb 2014) New Revision: 041e68b5f2a8c98ac98a7133533ab99d8400c4e2 https://github.com/droonga/grn2drn/commit/041e68b5f2a8c98ac98a7133533ab99d8400c4e2 Message: test load: add object style case Modified files: test/test-converter.rb Modified: test/test-converter.rb (+26 -0) =================================================================== --- test/test-converter.rb 2014-02-09 10:32:10 +0900 (fddb1ab) +++ test/test-converter.rb 2014-02-09 10:32:26 +0900 (4996a1a) @@ -130,6 +130,32 @@ load --table Users convert(command)) end + def test_object_style + command = <<-COMMAND.chomp +load --table Users +[ +{"_key": "user", "name": "Abe Shinzo"} +] + COMMAND + assert_equal([ + { + "id" => "test:0", + "date" => formatted_date, + "replyTo" => reply_to, + "dataset" => dataset, + "type" => "add", + "body" => { + "table" => "Users", + "key" => "user", + "values" => { + "name" => "Abe Shinzo", + }, + }, + }, + ], + convert(command)) + end + def test_multi_records command = <<-COMMAND.chomp load --table Users -------------- next part -------------- HTML����������������������������...Download