YUKI Hiroshi
null+****@clear*****
Thu Sep 12 15:32:27 JST 2013
YUKI Hiroshi 2013-09-12 15:32:27 +0900 (Thu, 12 Sep 2013) New Revision: 7f6b2c68c28c2784816cf48a353145feb9d0a027 https://github.com/droonga/fluent-plugin-droonga/commit/7f6b2c68c28c2784816cf48a353145feb9d0a027 Message: GroongaCommandConverter: Add test for column_create command Modified files: test/test_groonga_command_converter.rb Modified: test/test_groonga_command_converter.rb (+26 -0) =================================================================== --- test/test_groonga_command_converter.rb 2013-09-12 15:31:05 +0900 (c8754b0) +++ test/test_groonga_command_converter.rb 2013-09-12 15:32:27 +0900 (8d140be) @@ -55,6 +55,32 @@ class GroongaCommandConverterTest < Test::Unit::TestCase results) end + def test_column_create + results = [] + command = "column_create Terms Users_name COLUMN_INDEX|WITH_POSITION Users name" + @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 => "column_create", + :body => { + :table => "Terms", + :name => "Users_name", + :flags => "COLUMN_INDEX|WITH_POSITION", + :type => "Users", + :source => "name", + }, + }, + ], + results) + end + private def date Time.new(2013, 11, 29, 0, 0, 0) -------------- next part -------------- HTML����������������������������...Download