[#123] Fix hardcoded test value with a dynamic one

This commit is contained in:
Eric Davis 2011-05-13 11:53:25 -07:00
parent 0ba4134ecc
commit f79e209d4c
1 changed files with 2 additions and 1 deletions

View File

@ -239,8 +239,9 @@ class IssueNestedSetTest < ActiveSupport::TestCase
leaf.subject = 'leaf with journal'
leaf.save!
total_journals_on_children = leaf.reload.journals.count + child.reload.journals.count
assert_difference 'Issue.count', -2 do
assert_difference 'IssueJournal.count', -3 do
assert_difference 'IssueJournal.count', -total_journals_on_children do
Issue.find(child.id).destroy
end
end