aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-01-31 17:45:12 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-02-01 11:20:30 +0900
commitf3eccd942aba88d18097644bbb580b257a006c94 (patch)
tree2bfcd16e645ded88f490ece229c5691d7881cd54 /activerecord/test/cases
parent43dff0a7b1a90bc94d05781a0b82938bf87166ad (diff)
downloadrails-f3eccd942aba88d18097644bbb580b257a006c94.tar.gz
rails-f3eccd942aba88d18097644bbb580b257a006c94.tar.bz2
rails-f3eccd942aba88d18097644bbb580b257a006c94.zip
Remove duplicated composite primary key tests
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb8
-rw-r--r--activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb8
-rw-r--r--activerecord/test/cases/primary_keys_test.rb2
3 files changed, 1 insertions, 17 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb
index e8daedac53..31e87722d9 100644
--- a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb
@@ -53,14 +53,6 @@ module ActiveRecord
end
end
- def test_composite_primary_key
- with_example_table 'id serial, number serial, PRIMARY KEY (id, number)' do
- silence_warnings do
- assert_nil @connection.primary_key('ex')
- end
- end
- end
-
def test_primary_key_raises_error_if_table_not_found
assert_raises(ActiveRecord::StatementInvalid) do
@connection.primary_key('unobtainium')
diff --git a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
index 4cb2f02fe2..02c3358ba6 100644
--- a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
+++ b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
@@ -400,14 +400,6 @@ module ActiveRecord
end
end
- def test_composite_primary_key
- with_example_table 'id integer, number integer, foo integer, PRIMARY KEY (id, number)' do
- silence_warnings do
- assert_nil @conn.primary_key('ex')
- end
- end
- end
-
def test_supports_extensions
assert_not @conn.supports_extensions?, 'does not support extensions'
end
diff --git a/activerecord/test/cases/primary_keys_test.rb b/activerecord/test/cases/primary_keys_test.rb
index 155210cce9..b918b36b94 100644
--- a/activerecord/test/cases/primary_keys_test.rb
+++ b/activerecord/test/cases/primary_keys_test.rb
@@ -262,7 +262,7 @@ class CompositePrimaryKeyTest < ActiveRecord::TestCase
def test_primary_key_issues_warning
warning = capture(:stderr) do
- @connection.primary_key("barcodes")
+ assert_nil @connection.primary_key("barcodes")
end
assert_match(/WARNING: Rails does not support composite primary key\./, warning)
end