diff options
author | kennyj <kennyj@gmail.com> | 2012-07-03 01:29:37 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-07-03 12:19:31 +0900 |
commit | 9196b93111b5f89f030b089d32d7a3a9d49b0df9 (patch) | |
tree | d6f9857f7b6f2e5f288a1fe89a7fe9dd9b9e9d7f /activerecord/test/cases | |
parent | 215d41d802637520129cb7551b35faca72873143 (diff) | |
download | rails-9196b93111b5f89f030b089d32d7a3a9d49b0df9.tar.gz rails-9196b93111b5f89f030b089d32d7a3a9d49b0df9.tar.bz2 rails-9196b93111b5f89f030b089d32d7a3a9d49b0df9.zip |
Don't mark the store as changed if an attribute isn't changed.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/store_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/store_test.rb b/activerecord/test/cases/store_test.rb index e401dd4b12..7f2b8945f9 100644 --- a/activerecord/test/cases/store_test.rb +++ b/activerecord/test/cases/store_test.rb @@ -34,6 +34,11 @@ class StoreTest < ActiveRecord::TestCase assert @john.settings_changed? end + test "updating the store won't mark it as changed if an attribute isn't changed" do + @john.color = @john.color + assert !@john.settings_changed? + end + test "object initialization with not nullable column" do assert_equal true, @john.remember_login end |