mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
20 lines
690 B
Ruby
20 lines
690 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe RegistrantChange do
|
|
describe '#confirm' do
|
|
let(:domain) { instance_double(Domain) }
|
|
let(:old_registrant) { instance_double(Registrant) }
|
|
let(:message) { instance_spy(ActionMailer::MessageDelivery) }
|
|
|
|
before :example do
|
|
allow(RegistrantChangeMailer).to receive(:confirmed)
|
|
.with(domain: domain, old_registrant: old_registrant)
|
|
.and_return(message)
|
|
described_class.new(domain: domain, old_registrant: old_registrant).confirm
|
|
end
|
|
|
|
it 'notifies registrant' do
|
|
expect(message).to have_received(:deliver_now)
|
|
end
|
|
end
|
|
end
|