gitlab-org--gitlab-foss/spec/services/emails/confirm_service_spec.rb

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

20 lines
490 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Emails::ConfirmService do
let_it_be(:user) { create(:user) }
2017-09-12 15:36:59 +00:00
subject(:service) { described_class.new(user) }
describe '#execute' do
it 'enqueues a background job to send confirmation email again' do
email = user.emails.create!(email: 'new@email.com')
travel_to(10.minutes.from_now) do
expect { service.execute(email) }.to have_enqueued_job.on_queue('mailers')
end
end
end
end