aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/database_statements_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/database_statements_test.rb')
-rw-r--r--activerecord/test/cases/database_statements_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/database_statements_test.rb b/activerecord/test/cases/database_statements_test.rb
index ba085991e0..3169408ac0 100644
--- a/activerecord/test/cases/database_statements_test.rb
+++ b/activerecord/test/cases/database_statements_test.rb
@@ -13,6 +13,12 @@ class DatabaseStatementsTest < ActiveRecord::TestCase
assert_not_nil return_the_inserted_id(method: :create)
end
+ def test_insert_update_delete_sql_is_deprecated
+ assert_deprecated { @connection.insert_sql("INSERT INTO accounts (firm_id,credit_limit) VALUES (42,5000)") }
+ assert_deprecated { @connection.update_sql("UPDATE accounts SET credit_limit = 6000 WHERE firm_id = 42") }
+ assert_deprecated { @connection.delete_sql("DELETE FROM accounts WHERE firm_id = 42") }
+ end
+
private
def return_the_inserted_id(method:)