Kosuke Asami
null+****@clear*****
Mon Jul 22 14:42:41 JST 2013
Kosuke Asami 2013-07-22 14:42:41 +0900 (Mon, 22 Jul 2013) New Revision: 0cde6f364bff1b249d4d4ed3fc00b0fd99af3035 https://github.com/groonga/fluent-plugin-droonga/commit/0cde6f364bff1b249d4d4ed3fc00b0fd99af3035 Message: test column_create: extract a test that has different target data Modified files: test/plugin/groonga/test_column_create.rb Modified: test/plugin/groonga/test_column_create.rb (+20 -6) =================================================================== --- test/plugin/groonga/test_column_create.rb 2013-07-22 14:03:37 +0900 (5e19426) +++ test/plugin/groonga/test_column_create.rb 2013-07-22 14:42:41 +0900 (98ba14f) @@ -65,13 +65,27 @@ column_create Books title COLUMN_VECTOR ShortText assert_equal("table_create Books TABLE_HASH_KEY --key_type ShortText\n#{data[:schema]}", dump) end - data({ - "COLUMN_INDEX" => { - :flags => "COLUMN_INDEX", - :schema => <<-SCHEMA, + def test_index_column_type + data = { + :flags => "COLUMN_INDEX", + :schema => <<-SCHEMA, column_create Books entry_title COLUMN_INDEX Books title - SCHEMA - }, + SCHEMA + } + request = { + "table" => "Books", + "name" => "entry_title", + "type" => "Books", + "source" => "title", + "flags" => data[:flags], + } + @handler.table_create({"name" => "Books"}) + @handler.column_create({"table" => "Books", "name" => "title", "type" => "ShortText"}) + @handler.column_create(request) + assert_equal("table_create Books TABLE_HASH_KEY --key_type ShortText\ncolumn_create Books title COLUMN_SCALAR ShortText\n\n#{data[:schema]}", dump) + end + + data({ "WITH_SECTION" => { :flags => "COLUMN_INDEX|WITH_SECTION", :schema => <<-SCHEMA, -------------- next part -------------- HTML����������������������������...Download