2019-07-31 22:56:46 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Emails::ConfirmService do
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
|
|
|
|
subject(:service) { described_class.new(user) }
|
|
|
|
|
|
|
|
describe '#execute' do
|
2020-05-24 23:13:21 +05:30
|
|
|
it 'enqueues a background job to send confirmation email again' do
|
2018-03-17 18:26:18 +05:30
|
|
|
email = user.emails.create(email: 'new@email.com')
|
2020-05-24 23:13:21 +05:30
|
|
|
|
|
|
|
expect { service.execute(email) }.to have_enqueued_job.on_queue('mailers')
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|