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/adapters/sqlite3/sqlite3_adapter_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/adapters/sqlite3/sqlite3_adapter_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb index 02c3358ba6..bbc9f978bf 100644 --- a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb @@ -213,24 +213,12 @@ module ActiveRecord assert_equal "''", @conn.quote_string("'") end - def test_insert_sql - with_example_table do - 2.times do |i| - rv = @conn.insert_sql "INSERT INTO ex (number) VALUES (#{i})" - assert_equal(i + 1, rv) - end - - records = @conn.execute "SELECT * FROM ex" - assert_equal 2, records.length - end - end - - def test_insert_sql_logged + def test_insert_logged with_example_table do sql = "INSERT INTO ex (number) VALUES (10)" name = "foo" assert_logged [[sql, name, []]] do - @conn.insert_sql sql, name + @conn.insert(sql, name) end end end @@ -239,7 +227,7 @@ module ActiveRecord with_example_table do sql = "INSERT INTO ex (number) VALUES (10)" idval = 'vuvuzela' - id = @conn.insert_sql sql, nil, nil, idval + id = @conn.insert(sql, nil, nil, idval) assert_equal idval, id end end |