Sha256: 8f4c81b9c56338426cc1e264edb888b9f35898cbcb314b1dc456bea87ce3f6c8

Contents?: true

Size: 751 Bytes

Versions: 22

Compression:

Stored size: 751 Bytes

Contents

require 'test_helper'

module Workarea
  class StatusReporterTest < IntegrationTest
    def test_sending_to_emails_in_list
      create_user(email: 'foo@workarea.com', admin: true, status_email_recipient: true)
      create_user(email: 'bar@workarea.com', admin: true, status_email_recipient: true)

      # Check that rendering release works
      create_release(publish_at: Time.current + 1.days)
      create_release(publish_at: Time.current + 2.days)

      StatusReporter.new.perform

      assert(2, ActionMailer::Base.deliveries.count)
      delivery_emails = ActionMailer::Base.deliveries.map(&:to).flatten
      assert(delivery_emails.include?('foo@workarea.com'))
      assert(delivery_emails.include?('bar@workarea.com'))
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
workarea-core-3.5.20 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.19 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.18 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.17 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.16 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.15 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.14 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.13 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.12 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.11 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.10 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.9 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.8 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.7 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.6 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.5 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.4 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.3 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.2 test/workers/workarea/status_reporter_test.rb
workarea-core-3.5.1 test/workers/workarea/status_reporter_test.rb