Yoji Shidara
null+****@clear*****
Tue Feb 18 18:55:04 JST 2014
Yoji Shidara 2014-02-18 18:55:04 +0900 (Tue, 18 Feb 2014) New Revision: 9ab742ddc20980bdd8bb96ac0890c818afa1448b https://github.com/droonga/fluent-plugin-droonga/commit/9ab742ddc20980bdd8bb96ac0890c818afa1448b Message: schema: Move Table#to_table_create_body test Modified files: test/unit/catalog/test_schema.rb Modified: test/unit/catalog/test_schema.rb (+18 -40) =================================================================== --- test/unit/catalog/test_schema.rb 2014-02-18 18:50:24 +0900 (9de9870) +++ test/unit/catalog/test_schema.rb 2014-02-18 18:55:04 +0900 (e0d421d) @@ -32,46 +32,6 @@ class CatalogSchemaTest < Test::Unit::TestCase create_schema({}).to_commands) end - def test_hash_table - assert_equal([ - "type" => "table_create", - "body" => { - "name" => "table_name", - "key_type" => "ShortText", - "flags" => "TABLE_HASH_KEY" - } - ], - create_schema( - "table_name" => { - "type" => "Hash", - "keyType" => "ShortText" - } - ).to_commands - ) - end - - def test_patricia_trie_table - assert_equal([ - "type" => "table_create", - "body" => { - "name" => "table_name", - "key_type" => "ShortText", - "flags" => "TABLE_PAT_KEY", - "normalizer" => "NormalizerAuto", - "default_tokenizer" => "TokenBigram" - } - ], - create_schema( - "table_name" => { - "type" => "PatriciaTrie", - "keyType" => "ShortText", - "normalizer" => "NormalizerAuto", - "tokenizer" => "TokenBigram" - } - ).to_commands - ) - end - =begin def test_integration assert_equal([ @@ -222,6 +182,24 @@ class CatalogSchemaTest < Test::Unit::TestCase "normalizer" => "NormalizerAuto" }).normalizer) end + + def test_to_table_create_body + assert_equal({ + "name" => "table_name", + "key_type" => "ShortText", + "flags" => "TABLE_PAT_KEY", + "normalizer" => "NormalizerAuto", + "default_tokenizer" => "TokenBigram" + }, + create_table("table_name", + { + "type" => "PatriciaTrie", + "keyType" => "ShortText", + "normalizer" => "NormalizerAuto", + "tokenizer" => "TokenBigram" + }).to_table_create_body) + + end end class ColumnTest < self -------------- next part -------------- HTML����������������������������...Download