mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
parent
bfc0c0b74f
commit
876c010435
17 changed files with 156 additions and 273 deletions
18
spec/jobs/domain_update_confirm_job_spec.rb
Normal file
18
spec/jobs/domain_update_confirm_job_spec.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe DomainUpdateConfirmJob do
|
||||
let(:domain) { instance_spy(Epp::Domain, registrant: registrant, errors: []) }
|
||||
let(:registrant) { instance_double(Registrant) }
|
||||
let(:registrant_change) { instance_spy(RegistrantChange) }
|
||||
|
||||
it 'confirms registrant change' do
|
||||
expect(Epp::Domain).to receive(:find).and_return(domain)
|
||||
expect(RegistrantChange).to receive(:new)
|
||||
.with(domain: domain, old_registrant: registrant)
|
||||
.and_return(registrant_change)
|
||||
|
||||
described_class.enqueue(domain_id = nil, action = RegistrantVerification::CONFIRMED)
|
||||
|
||||
expect(registrant_change).to have_received(:confirm)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue