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/postgresql/postgresql_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/postgresql/postgresql_adapter_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb index fbdaab2fdd..8b08ebc3c4 100644 --- a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb +++ b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb @@ -60,50 +60,6 @@ module ActiveRecord end end - def test_insert_sql_with_proprietary_returning_clause - with_example_table do - id = @connection.insert_sql("insert into ex (number) values(5150)", nil, "number") - assert_equal 5150, id - end - end - - def test_insert_sql_with_quoted_schema_and_table_name - with_example_table do - id = @connection.insert_sql('insert into "public"."ex" (number) values(5150)') - expect = @connection.query('select max(id) from ex').first.first - assert_equal expect, id - end - end - - def test_insert_sql_with_no_space_after_table_name - with_example_table do - id = @connection.insert_sql("insert into ex(number) values(5150)") - expect = @connection.query('select max(id) from ex').first.first - assert_equal expect, id - end - end - - def test_multiline_insert_sql - with_example_table do - id = @connection.insert_sql(<<-SQL) - insert into ex( - number) - values( - 5152 - ) - SQL - expect = @connection.query('select max(id) from ex').first.first - assert_equal expect, id - end - end - - def test_insert_sql_with_returning_disabled - connection = connection_without_insert_returning - id = connection.insert_sql("insert into postgresql_partitioned_table_parent (number) VALUES (1)") - expect = connection.query('select max(id) from postgresql_partitioned_table_parent').first.first - assert_equal expect.to_i, id - end - def test_exec_insert_with_returning_disabled connection = connection_without_insert_returning result = connection.exec_insert("insert into postgresql_partitioned_table_parent (number) VALUES (1)", nil, [], 'id', 'postgresql_partitioned_table_parent_id_seq') |