Welcome to mirror list, hosted at ThFree Co, Russian Federation.

confirm_service_spec.rb « emails « services « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 973d2731b2fe8d7a30efc84d21cb8b04adc990db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require 'spec_helper'

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

  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')

      expect { service.execute(email) }.to have_enqueued_job.on_queue('mailers')
    end
  end
end