mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
18 lines
714 B
Ruby
18 lines
714 B
Ruby
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
|