YUKI Hiroshi
null+****@clear*****
Thu Sep 12 19:10:43 JST 2013
YUKI Hiroshi 2013-09-12 19:10:43 +0900 (Thu, 12 Sep 2013) New Revision: cfd2718d7b7dbb50b420bde79fcb8e0e848839ae https://github.com/droonga/fluent-plugin-droonga/commit/cfd2718d7b7dbb50b420bde79fcb8e0e848839ae Message: GroongaCommandConverter: Add test for "select" command Modified files: test/test_groonga_command_converter.rb Modified: test/test_groonga_command_converter.rb (+25 -0) =================================================================== --- test/test_groonga_command_converter.rb 2013-09-12 19:10:24 +0900 (e10a51b) +++ test/test_groonga_command_converter.rb 2013-09-12 19:10:43 +0900 (333167b) @@ -142,6 +142,31 @@ class GroongaCommandConverterTest < Test::Unit::TestCase results) end + def test_select + results = [] + command = "select --filter \"age<=30\" " + + "--output_type \"json\" --table \"Users\"" + @converter.convert(command) do |droonga_command| + results << droonga_command + end + assert_equal([ + { + :id => "test:0", + :date => formatted_date, + :replyTo => reply_to, + :statusCode => status_code, + :dataset => dataset, + :type => "select", + :body => { + :table => "Users", + :filter => "age<=30", + :output_type => "json", + }, + }, + ], + results) + end + private def date Time.new(2013, 11, 29, 0, 0, 0) -------------- next part -------------- HTML����������������������������...Download