debian-mirror-gitlab/spec/services/emails/confirm_service_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
432 B
Ruby
Raw Normal View History

2019-07-31 22:56:46 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Emails::ConfirmService do
2018-03-17 18:26:18 +05:30
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
2021-01-29 00:20:46 +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