Navigation Menu

Skip to content

Commit

Permalink
test: Add test for column_remove with index
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 23, 2014
1 parent 8972d00 commit 5c96005
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/unit/plugins/groonga/test_column_remove.rb
Expand Up @@ -77,6 +77,21 @@ def test_remove
process(:column_remove,
{"table" => "Books", "name" => "title"})
assert_equal(<<-SCHEMA, dump)
table_create Books TABLE_HASH_KEY --key_type ShortText
SCHEMA
end

def test_remove_index
Groonga::Schema.define(:context => @context) do |schema|
schema.create_table("Books", :type => :hash)
schema.change_table("Books") do |table|
table.column("title", "ShortText", :type => :scalar)
table.index("Books", "title", :name => "entry_title")
end
end
process(:column_remove,
{"table" => "Books", "name" => "title"})
assert_equal(<<-SCHEMA, dump)
table_create Books TABLE_HASH_KEY --key_type ShortText
SCHEMA
end
Expand Down

0 comments on commit 5c96005

Please sign in to comment.