spec/integration/lhm_spec.rb in lhm-1.0.0.rc.1 vs spec/integration/lhm_spec.rb in lhm-1.0.0.rc2
- old
+ new
@@ -53,12 +53,20 @@
end
key?(table_read("users"), ["comment", "created_at"]).must_equal(true)
end
+ it "should add a unqiue index" do
+ hadron_change_table("users") do |t|
+ t.add_unique_index(:comment)
+ end
+
+ key?(table_read(:users), :comment, :unique).must_equal(true)
+ end
+
it "should remove an index" do
hadron_change_table("users") do |t|
- t.remove_index(:username, :created_at)
+ t.remove_index([:username, :created_at])
end
key?(table_read("users"), ["username", "created_at"]).must_equal(false)
end