diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-06-03 14:57:02 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-06-03 14:59:59 +0200 |
commit | 254cdf4728291277f3fbaa854f34495030e476b4 (patch) | |
tree | dee5e491b3f142a58d076ff760335c3fa5f04ee2 /activerecord | |
parent | 098bb63ae4acc349826ab84b3e1dff985e38609c (diff) | |
download | rails-254cdf4728291277f3fbaa854f34495030e476b4.tar.gz rails-254cdf4728291277f3fbaa854f34495030e476b4.tar.bz2 rails-254cdf4728291277f3fbaa854f34495030e476b4.zip |
test pg, we don't care about the internal state of `column#default`.
That data is internal to Active Record. What we care about is that
new records have the right default value.
Diffstat (limited to 'activerecord')
5 files changed, 0 insertions, 9 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/array_test.rb b/activerecord/test/cases/adapters/postgresql/array_test.rb index 34c2008ab4..b9e0f62db8 100644 --- a/activerecord/test/cases/adapters/postgresql/array_test.rb +++ b/activerecord/test/cases/adapters/postgresql/array_test.rb @@ -42,7 +42,6 @@ class PostgresqlArrayTest < ActiveRecord::TestCase PgArray.reset_column_information column = PgArray.columns_hash["score"] - assert_equal([4, 4, 2], column.default) assert_equal([4, 4, 2], PgArray.new.score) ensure PgArray.reset_column_information @@ -53,7 +52,6 @@ class PostgresqlArrayTest < ActiveRecord::TestCase PgArray.reset_column_information column = PgArray.columns_hash["names"] - assert_equal(["foo", "bar"], column.default) assert_equal(["foo", "bar"], PgArray.new.names) ensure PgArray.reset_column_information diff --git a/activerecord/test/cases/adapters/postgresql/enum_test.rb b/activerecord/test/cases/adapters/postgresql/enum_test.rb index b809f1a79c..fda718ca81 100644 --- a/activerecord/test/cases/adapters/postgresql/enum_test.rb +++ b/activerecord/test/cases/adapters/postgresql/enum_test.rb @@ -44,7 +44,6 @@ class PostgresqlEnumTest < ActiveRecord::TestCase PostgresqlEnum.reset_column_information column = PostgresqlEnum.columns_hash["good_mood"] - assert_equal "happy", column.default assert_equal "happy", PostgresqlEnum.new.good_mood ensure PostgresqlEnum.reset_column_information diff --git a/activerecord/test/cases/adapters/postgresql/geometric_test.rb b/activerecord/test/cases/adapters/postgresql/geometric_test.rb index 46c7662879..8aaabbbbed 100644 --- a/activerecord/test/cases/adapters/postgresql/geometric_test.rb +++ b/activerecord/test/cases/adapters/postgresql/geometric_test.rb @@ -2,8 +2,6 @@ require "cases/helper" require 'support/connection_helper' require 'support/schema_dumping_helper' -require 'active_record/base' -require 'active_record/connection_adapters/postgresql_adapter' class PostgresqlPointTest < ActiveRecord::TestCase include ConnectionHelper @@ -38,11 +36,9 @@ class PostgresqlPointTest < ActiveRecord::TestCase def test_default column = PostgresqlPoint.columns_hash["y"] - assert_equal [12.2, 13.3], column.default assert_equal [12.2, 13.3], PostgresqlPoint.new.y column = PostgresqlPoint.columns_hash["z"] - assert_equal [14.4, 15.5], column.default assert_equal [14.4, 15.5], PostgresqlPoint.new.z end diff --git a/activerecord/test/cases/adapters/postgresql/hstore_test.rb b/activerecord/test/cases/adapters/postgresql/hstore_test.rb index 1fef4899be..c1d896c06c 100644 --- a/activerecord/test/cases/adapters/postgresql/hstore_test.rb +++ b/activerecord/test/cases/adapters/postgresql/hstore_test.rb @@ -66,7 +66,6 @@ class PostgresqlHstoreTest < ActiveRecord::TestCase Hstore.reset_column_information column = Hstore.columns_hash["permissions"] - assert_equal({"users"=>"read", "articles"=>"write"}, column.default) assert_equal({"users"=>"read", "articles"=>"write"}, Hstore.new.permissions) ensure Hstore.reset_column_information diff --git a/activerecord/test/cases/adapters/postgresql/json_test.rb b/activerecord/test/cases/adapters/postgresql/json_test.rb index 03b546119d..66a2140b29 100644 --- a/activerecord/test/cases/adapters/postgresql/json_test.rb +++ b/activerecord/test/cases/adapters/postgresql/json_test.rb @@ -45,7 +45,6 @@ class PostgresqlJSONTest < ActiveRecord::TestCase JsonDataType.reset_column_information column = JsonDataType.columns_hash["permissions"] - assert_equal({"users"=>"read", "posts"=>["read", "write"]}, column.default) assert_equal({"users"=>"read", "posts"=>["read", "write"]}, JsonDataType.new.permissions) ensure JsonDataType.reset_column_information |