summaryrefslogtreecommitdiff
path: root/spec/services/emails/confirm_service_spec.rb
blob: 2b2c31e2521ef2e596acf9a2db2ab8e8db210922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'spec_helper'

describe Emails::ConfirmService do
  let(:user) { create(:user) }

  subject(:service) { described_class.new(user) }

  describe '#execute' do
    it 'sends a confirmation email again' do
      email = user.emails.create(email: 'new@email.com')
      mail  = service.execute(email)
      expect(mail.subject).to eq('Confirmation instructions')
    end
  end
end