mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
Remove duplicate rspec tests
This commit is contained in:
parent
417a390ff7
commit
a8884b0545
2 changed files with 0 additions and 58 deletions
|
@ -1,40 +0,0 @@
|
||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
RSpec.describe DomainDeleteConfirmEmailJob do
|
|
||||||
describe '#run' do
|
|
||||||
let(:domain) { instance_double(Domain) }
|
|
||||||
let(:message) { instance_double(ActionMailer::MessageDelivery) }
|
|
||||||
|
|
||||||
before :example do
|
|
||||||
expect(Domain).to receive(:find).and_return(domain)
|
|
||||||
allow(domain).to receive_messages(
|
|
||||||
id: 1,
|
|
||||||
name: 'test.com',
|
|
||||||
registrant_email: 'registrant@test.com',
|
|
||||||
registrar: 'registrar',
|
|
||||||
registrant: 'registrant')
|
|
||||||
end
|
|
||||||
|
|
||||||
after :example do
|
|
||||||
domain_id = 1
|
|
||||||
described_class.enqueue(domain_id)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'creates log record' do
|
|
||||||
log_message = 'Send DomainDeleteMailer#confirm email for domain test.com (#1) to registrant@test.com'
|
|
||||||
|
|
||||||
allow(DomainDeleteMailer).to receive(:confirm).and_return(message)
|
|
||||||
allow(message).to receive(:deliver_now)
|
|
||||||
|
|
||||||
expect(Rails.logger).to receive(:info).with(log_message)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'sends email' do
|
|
||||||
expect(DomainDeleteMailer).to receive(:confirm).with(domain: domain,
|
|
||||||
registrar: 'registrar',
|
|
||||||
registrant: 'registrant')
|
|
||||||
.and_return(message)
|
|
||||||
expect(message).to receive(:deliver_now)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,18 +0,0 @@
|
||||||
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