diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-17 18:08:59 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-17 18:08:59 -0300 |
commit | f42f603d8a4ab54b4b3866a6a747880c46467da1 (patch) | |
tree | c26007ca962f04cf792818a9176160ee0d90758b /activerecord/test/cases | |
parent | f55ea89e47a62192ef1a51e201e4a80dd52871d1 (diff) | |
parent | d9812729c325006212ad0e0e1566cc76c072e709 (diff) | |
download | rails-f42f603d8a4ab54b4b3866a6a747880c46467da1.tar.gz rails-f42f603d8a4ab54b4b3866a6a747880c46467da1.tar.bz2 rails-f42f603d8a4ab54b4b3866a6a747880c46467da1.zip |
Merge pull request #15780 from sgrif/sg-dont-always-save-mutable-types
Don't assume that Hstore columns have always changed
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/hstore_test.rb | 1 | ||||
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/json_test.rb | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/hstore_test.rb b/activerecord/test/cases/adapters/postgresql/hstore_test.rb index 83b495d600..c4e2917251 100644 --- a/activerecord/test/cases/adapters/postgresql/hstore_test.rb +++ b/activerecord/test/cases/adapters/postgresql/hstore_test.rb @@ -170,6 +170,7 @@ class PostgresqlHstoreTest < ActiveRecord::TestCase hstore.reload assert_equal 'four', hstore.settings['three'] + assert_not hstore.changed? end def test_gen1 diff --git a/activerecord/test/cases/adapters/postgresql/json_test.rb b/activerecord/test/cases/adapters/postgresql/json_test.rb index a3400a5a19..3c07209472 100644 --- a/activerecord/test/cases/adapters/postgresql/json_test.rb +++ b/activerecord/test/cases/adapters/postgresql/json_test.rb @@ -183,6 +183,7 @@ class PostgresqlJSONTest < ActiveRecord::TestCase json.save! json.reload - assert json.payload['three'] = 'four' + assert_equal({ 'one' => 'two', 'three' => 'four' }, json.payload) + assert_not json.changed? end end |