aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/migration/index_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/index_test.rb b/activerecord/test/cases/migration/index_test.rb
index bfa275fee2..0787414d8f 100644
--- a/activerecord/test/cases/migration/index_test.rb
+++ b/activerecord/test/cases/migration/index_test.rb
@@ -97,6 +97,16 @@ module ActiveRecord
end
end
+ def test_deprecated_type_argument
+ message = "Passing a string as third argument of `add_index` is deprecated and will" +
+ " be removed in Rails 4.1." +
+ " Use add_index(:testings, [:foo, :bar], unique: true) instead"
+
+ assert_deprecated message do
+ connection.add_index :testings, [:foo, :bar], "UNIQUE"
+ end
+ end
+
def test_unique_index_exists
connection.add_index :testings, :foo, :unique => true