Asserts that objects are not nil before getting their ids (test still fails with ruby1.9.3).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8233 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-12-15 12:27:41 +00:00
parent a61c9d53eb
commit f27d426347
1 changed files with 2 additions and 0 deletions

View File

@ -107,8 +107,10 @@ class PdfTest < ActiveSupport::TestCase
assert a2.visible? assert a2.visible?
aa1 = Redmine::Export::PDF::RDMPdfEncoding::attach(Attachment.all, "Testfile.PNG", "UTF-8") aa1 = Redmine::Export::PDF::RDMPdfEncoding::attach(Attachment.all, "Testfile.PNG", "UTF-8")
assert_not_nil aa1
assert_equal 17, aa1.id assert_equal 17, aa1.id
aa2 = Redmine::Export::PDF::RDMPdfEncoding::attach(Attachment.all, "test#{str2}.png", encoding) aa2 = Redmine::Export::PDF::RDMPdfEncoding::attach(Attachment.all, "test#{str2}.png", encoding)
assert_not_nil aa2
assert_equal 19, aa2.id assert_equal 19, aa2.id
User.current = nil User.current = nil