aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/dirty_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/dirty_test.rb')
-rw-r--r--activerecord/test/cases/dirty_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb
index 75f7453aa9..bde93d1c85 100644
--- a/activerecord/test/cases/dirty_test.rb
+++ b/activerecord/test/cases/dirty_test.rb
@@ -408,11 +408,11 @@ class DirtyTest < ActiveRecord::TestCase
def test_previous_changes
# original values should be in previous_changes
pirate = Pirate.new
-
+
assert_equal Hash.new, pirate.previous_changes
pirate.catchphrase = "arrr"
pirate.save!
-
+
assert_equal 4, pirate.previous_changes.size
assert_equal [nil, "arrr"], pirate.previous_changes['catchphrase']
assert_equal [nil, pirate.id], pirate.previous_changes['id']
@@ -421,21 +421,21 @@ class DirtyTest < ActiveRecord::TestCase
assert_nil pirate.previous_changes['created_on'][0]
assert_not_nil pirate.previous_changes['created_on'][1]
assert !pirate.previous_changes.key?('parrot_id')
-
+
# original values should be in previous_changes
pirate = Pirate.new
-
+
assert_equal Hash.new, pirate.previous_changes
pirate.catchphrase = "arrr"
pirate.save
-
+
assert_equal 4, pirate.previous_changes.size
assert_equal [nil, "arrr"], pirate.previous_changes['catchphrase']
assert_equal [nil, pirate.id], pirate.previous_changes['id']
assert pirate.previous_changes.include?('updated_on')
assert pirate.previous_changes.include?('created_on')
assert !pirate.previous_changes.key?('parrot_id')
-
+
pirate.catchphrase = "Yar!!"
pirate.reload
assert_equal Hash.new, pirate.previous_changes
@@ -480,7 +480,7 @@ class DirtyTest < ActiveRecord::TestCase
assert_not_nil pirate.previous_changes['updated_on'][0]
assert_not_nil pirate.previous_changes['updated_on'][1]
assert !pirate.previous_changes.key?('parrot_id')
- assert !pirate.previous_changes.key?('created_on')
+ assert !pirate.previous_changes.key?('created_on')
end
private