2017-09-09 09:55:07 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Emails::ConfirmService do
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
|
2017-09-12 11:36:59 -04:00
|
|
|
subject(:service) { described_class.new(user) }
|
2017-09-09 09:55:07 -04:00
|
|
|
|
|
|
|
describe '#execute' do
|
|
|
|
it 'sends a confirmation email again' do
|
2017-09-12 11:36:59 -04:00
|
|
|
email = user.emails.create(email: 'new@email.com')
|
|
|
|
mail = service.execute(email)
|
2017-09-09 09:55:07 -04:00
|
|
|
expect(mail.subject).to eq('Confirmation instructions')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|