mirror of
https://github.com/internetee/registry.git
synced 2025-06-09 14:14:49 +02:00
20 lines
689 B
Ruby
20 lines
689 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(:accepted)
|
|
.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
|