##// END OF EJS Templates
Rails3: test: add .to_s for mail's bodies check at functional/issues_controller_test.rb...
Toshi MARUYAMA -
r8912:41217ffea0eb
parent child
Show More
@@ -2168,7 +2168,7 class IssuesControllerTest < ActionController::TestCase
2168 mail = ActionMailer::Base.deliveries.last
2168 mail = ActionMailer::Base.deliveries.last
2169 assert_not_nil mail
2169 assert_not_nil mail
2170 assert mail.subject.starts_with?("[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}]")
2170 assert mail.subject.starts_with?("[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}]")
2171 assert mail.body.include?("Subject changed from #{old_subject} to #{new_subject}")
2171 assert mail.body.to_s.include?("Subject changed from #{old_subject} to #{new_subject}")
2172 end
2172 end
2173
2173
2174 def test_put_update_with_project_change
2174 def test_put_update_with_project_change
@@ -2242,7 +2242,7 class IssuesControllerTest < ActionController::TestCase
2242
2242
2243 mail = ActionMailer::Base.deliveries.last
2243 mail = ActionMailer::Base.deliveries.last
2244 assert_not_nil mail
2244 assert_not_nil mail
2245 assert mail.body.include?("Searchable field changed from 125 to New custom value")
2245 assert mail.body.to_s.include?("Searchable field changed from 125 to New custom value")
2246 end
2246 end
2247
2247
2248 def test_put_update_with_multi_custom_field_change
2248 def test_put_update_with_multi_custom_field_change
@@ -2285,7 +2285,7 class IssuesControllerTest < ActionController::TestCase
2285 assert_equal 2, j.details.size
2285 assert_equal 2, j.details.size
2286
2286
2287 mail = ActionMailer::Base.deliveries.last
2287 mail = ActionMailer::Base.deliveries.last
2288 assert mail.body.include?("Status changed from New to Assigned")
2288 assert mail.body.to_s.include?("Status changed from New to Assigned")
2289 # subject should contain the new status
2289 # subject should contain the new status
2290 assert mail.subject.include?("(#{ IssueStatus.find(2).name })")
2290 assert mail.subject.include?("(#{ IssueStatus.find(2).name })")
2291 end
2291 end
@@ -2303,7 +2303,7 class IssuesControllerTest < ActionController::TestCase
2303 assert_equal User.anonymous, j.user
2303 assert_equal User.anonymous, j.user
2304
2304
2305 mail = ActionMailer::Base.deliveries.last
2305 mail = ActionMailer::Base.deliveries.last
2306 assert mail.body.include?(notes)
2306 assert mail.body.to_s.include?(notes)
2307 end
2307 end
2308
2308
2309 def test_put_update_with_note_and_spent_time
2309 def test_put_update_with_note_and_spent_time
@@ -2361,7 +2361,7 class IssuesControllerTest < ActionController::TestCase
2361 assert_equal 59, File.size(attachment.diskfile)
2361 assert_equal 59, File.size(attachment.diskfile)
2362
2362
2363 mail = ActionMailer::Base.deliveries.last
2363 mail = ActionMailer::Base.deliveries.last
2364 assert mail.body.include?('testfile.txt')
2364 assert mail.body.to_s.include?('testfile.txt')
2365 end
2365 end
2366
2366
2367 def test_put_update_with_failure_should_save_attachments
2367 def test_put_update_with_failure_should_save_attachments
General Comments 0
You need to be logged in to leave comments. Login now