get the object from the db anew, in case it didn't save
This commit is contained in:
parent
4eb07d6ce6
commit
ccc4688799
|
@ -157,14 +157,14 @@ class ActiveSupport::TestCase
|
|||
@detail = IssueJournal.generate(:version => 1, :journaled => Issue.last)
|
||||
@detail.update_attribute(:changes, {prop_key => [@old_value.id, @new_value.id]}.to_yaml)
|
||||
|
||||
assert_match @new_value.name, @detail.render_detail(prop_key, true)
|
||||
assert_match @new_value.class.find(@new_value.id).name, @detail.render_detail(prop_key, true)
|
||||
end
|
||||
|
||||
should "use the old value's name" do
|
||||
@detail = IssueJournal.generate(:version => 1, :journaled => Issue.last)
|
||||
@detail.update_attribute(:changes, {prop_key => [@old_value.id, @new_value.id]}.to_yaml)
|
||||
|
||||
assert_match @old_value.name, @detail.render_detail(prop_key, true)
|
||||
assert_match @old_value.class.find(@old_value.id).name, @detail.render_detail(prop_key, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue