diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-03-02 17:42:39 -0300 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-03-02 17:42:39 -0300 |
commit | 31b890309a18a223d845b647e36682e9363f5c5c (patch) | |
tree | a66b2217879d6b132af37b090b3be1fedfe77a27 /activerecord/test/cases/database_statements_test.rb | |
parent | cf075d9f55047281a5912e1b28cc4cb4bfcfdbf0 (diff) | |
parent | 6b937bb9556bc7c51aa8cfa60791c4910763e5e3 (diff) | |
download | rails-31b890309a18a223d845b647e36682e9363f5c5c.tar.gz rails-31b890309a18a223d845b647e36682e9363f5c5c.tar.bz2 rails-31b890309a18a223d845b647e36682e9363f5c5c.zip |
Merge pull request #23086 from kamipo/deprecate_insert_update_delete_sql
Deprecate `{insert|update|delete}_sql` in `DatabaseStatements`
Diffstat (limited to 'activerecord/test/cases/database_statements_test.rb')
-rw-r--r-- | activerecord/test/cases/database_statements_test.rb | 6 |
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:) |