feat: Contact Exports (#7258)
This commit is contained in:
@@ -10,6 +10,7 @@ RSpec.describe AdministratorNotifications::ChannelNotificationsMailer do
|
||||
before do
|
||||
allow(described_class).to receive(:new).and_return(class_instance)
|
||||
allow(class_instance).to receive(:smtp_config_set_or_development?).and_return(true)
|
||||
Account::ContactsExportJob.perform_now(account.id, [])
|
||||
end
|
||||
|
||||
describe 'slack_disconnect' do
|
||||
@@ -55,4 +56,17 @@ RSpec.describe AdministratorNotifications::ChannelNotificationsMailer do
|
||||
expect(mail.to).to eq([administrator.email])
|
||||
end
|
||||
end
|
||||
|
||||
describe 'contact_export_complete' do
|
||||
let!(:file_url) { Rails.application.routes.url_helpers.rails_blob_url(account.contacts_export) }
|
||||
let(:mail) { described_class.with(account: account).contact_export_complete(file_url).deliver_now }
|
||||
|
||||
it 'renders the subject' do
|
||||
expect(mail.subject).to eq("Your contact's export file is available to download.")
|
||||
end
|
||||
|
||||
it 'renders the receiver email' do
|
||||
expect(mail.to).to eq([administrator.email])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user