mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 07:52:04 +02:00
parent
bfc0c0b74f
commit
876c010435
17 changed files with 156 additions and 273 deletions
20
spec/services/registrant_change_spec.rb
Normal file
20
spec/services/registrant_change_spec.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue