Skip to content
Snippets Groups Projects
Commit ccc46887 authored by Tim Felgentreff's avatar Tim Felgentreff
Browse files

get the object from the db anew, in case it didn't save

parent 4eb07d6c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment