Commit 4757d788e80962aa90deb7771befef8acfeb7e84

Authored by Shuky Dvir
1 parent 53d7647f
Exists in master and in 1 other branch production

fixing the test of truncating the subject in the notice email

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
spec/controllers/notices_controller_spec.rb
@@ -51,7 +51,7 @@ describe NoticesController do @@ -51,7 +51,7 @@ describe NoticesController do
51 response.body.should match(%r{<url[^>]*>(.+)#{locate_path(@notice.id)}</url>}) 51 response.body.should match(%r{<url[^>]*>(.+)#{locate_path(@notice.id)}</url>})
52 email = ActionMailer::Base.deliveries.last 52 email = ActionMailer::Base.deliveries.last
53 email.to.should include(@app.watchers.first.email) 53 email.to.should include(@app.watchers.first.email)
54 - email.subject.should include(@notice.message) 54 + email.subject.should include(@notice.message.truncate(50))
55 email.subject.should include("[#{@app.name}]") 55 email.subject.should include("[#{@app.name}]")
56 email.subject.should include("[#{@notice.environment_name}]") 56 email.subject.should include("[#{@notice.environment_name}]")
57 end 57 end