diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-11-02 18:58:27 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-11-02 19:00:58 -0200 |
commit | 8fc52706c376be03f644e847d1dd357fc88ead6f (patch) | |
tree | 90d5ba3565ef3b125144b5c65111930f2cb19cbe /activerecord/test | |
parent | 48a7a261c2e461ecab738d061c31a7dece699d97 (diff) | |
download | rails-8fc52706c376be03f644e847d1dd357fc88ead6f.tar.gz rails-8fc52706c376be03f644e847d1dd357fc88ead6f.tar.bz2 rails-8fc52706c376be03f644e847d1dd357fc88ead6f.zip |
Raise an ArgumentError when passing an invalid option to add_index
Closes #8104
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration/index_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/index_test.rb b/activerecord/test/cases/migration/index_test.rb index dd9492924c..bfa275fee2 100644 --- a/activerecord/test/cases/migration/index_test.rb +++ b/activerecord/test/cases/migration/index_test.rb @@ -91,6 +91,12 @@ module ActiveRecord assert connection.index_exists?(:testings, [:foo, :bar]) end + def test_valid_index_options + assert_raise ArgumentError do + connection.add_index :testings, :foo, unqiue: true + end + end + def test_unique_index_exists connection.add_index :testings, :foo, :unique => true |