Commit e81fd39dddcba2f158187972ecc776bf7ba0e9cb
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'fix_person_notifier' into stable
Conflicts: test/unit/person_notifier_test.rb
Showing
1 changed file
with
9 additions
and
9 deletions
Show diff stats
test/unit/person_notifier_test.rb
@@ -225,6 +225,15 @@ class PersonNotifierTest < ActiveSupport::TestCase | @@ -225,6 +225,15 @@ class PersonNotifierTest < ActiveSupport::TestCase | ||
225 | assert !jobs.select {|j| !j.failed? && j.last_error.nil? }.empty? | 225 | assert !jobs.select {|j| !j.failed? && j.last_error.nil? }.empty? |
226 | end | 226 | end |
227 | 227 | ||
228 | + should 'render image tags for both internal and external src' do | ||
229 | + @community.add_member(@member) | ||
230 | + process_delayed_job_queue | ||
231 | + notify | ||
232 | + sent = ActionMailer::Base.deliveries.last | ||
233 | + assert_match /src="\/\/www.gravatar.com\/avatar.*"/, sent.body.to_s | ||
234 | + assert_match /src="http:\/\/.*\/images\/icons-app\/community-icon.png.*"/, sent.body.to_s | ||
235 | + end | ||
236 | + | ||
228 | should 'do not raise errors in NotifyJob failure to avoid loop' do | 237 | should 'do not raise errors in NotifyJob failure to avoid loop' do |
229 | Delayed::Worker.max_attempts = 1 | 238 | Delayed::Worker.max_attempts = 1 |
230 | Delayed::Job.enqueue(PersonNotifier::NotifyJob.new(@member.id)) | 239 | Delayed::Job.enqueue(PersonNotifier::NotifyJob.new(@member.id)) |
@@ -237,15 +246,6 @@ class PersonNotifierTest < ActiveSupport::TestCase | @@ -237,15 +246,6 @@ class PersonNotifierTest < ActiveSupport::TestCase | ||
237 | assert jobs.select {|j| !j.failed? && j.last_error.nil? }.empty? | 246 | assert jobs.select {|j| !j.failed? && j.last_error.nil? }.empty? |
238 | end | 247 | end |
239 | 248 | ||
240 | - should 'render image tags for both internal and external src' do | ||
241 | - @community.add_member(@member) | ||
242 | - process_delayed_job_queue | ||
243 | - notify | ||
244 | - sent = ActionMailer::Base.deliveries.last | ||
245 | - assert_match /src="\/\/www.gravatar.com\/avatar.*"/, sent.body.to_s | ||
246 | - assert_match /src="http:\/\/localhost\/images\/icons-app\/community-icon.png.*"/, sent.body.to_s | ||
247 | - end | ||
248 | - | ||
249 | should 'list tasks in notification mail' do | 249 | should 'list tasks in notification mail' do |
250 | task = @member.tasks.create! | 250 | task = @member.tasks.create! |
251 | process_delayed_job_queue | 251 | process_delayed_job_queue |