mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
parent
9ad84d78aa
commit
4f13258352
10 changed files with 17 additions and 11 deletions
|
@ -11,7 +11,8 @@ class DomainDeleteConfirmEmailJob < Que::Job
|
|||
private
|
||||
|
||||
def log(domain)
|
||||
message = "Send DomainDeleteMailer#confirm email for domain ##{domain.id} to #{domain.registrant_email}"
|
||||
message = "Send DomainDeleteMailer#confirm email for domain #{domain.name} (##{domain.id})" \
|
||||
" to #{domain.registrant_email}"
|
||||
logger.info(message)
|
||||
end
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ class DomainDeleteForcedEmailJob < Que::Job
|
|||
private
|
||||
|
||||
def log(domain)
|
||||
message = "Send DomainDeleteMailer#forced email for domain ##{domain.id} to #{domain.primary_contact_emails
|
||||
.join(', ')}"
|
||||
message = "Send DomainDeleteMailer#forced email for domain #{domain.name} (##{domain.id})" \
|
||||
" to #{domain.primary_contact_emails.join(', ')}"
|
||||
logger.info(message)
|
||||
end
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class RegistrantChangeConfirmEmailJob < Que::Job
|
|||
private
|
||||
|
||||
def log(domain)
|
||||
message = "Send RegistrantChangeMailer#confirm email for domain ##{domain.id} to #{domain.registrant_email}"
|
||||
message = "Send RegistrantChangeMailer#confirm email for domain #{domain.name} (##{domain.id}) to #{domain.registrant_email}"
|
||||
logger.info(message)
|
||||
end
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ class RegistrantChangeExpiredEmailJob < Que::Job
|
|||
private
|
||||
|
||||
def log(domain)
|
||||
message = "Send RegistrantChangeMailer#expired email for domain ##{domain.id} to #{domain.new_registrant_email}"
|
||||
message = "Send RegistrantChangeMailer#expired email for domain #{domain.name} (##{domain.id}) to #{domain.new_registrant_email}"
|
||||
logger.info(message)
|
||||
end
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class RegistrantChangeNoticeEmailJob < Que::Job
|
|||
private
|
||||
|
||||
def log(domain, new_registrant)
|
||||
message = "Send RegistrantChangeMailer#notice email for domain ##{domain.id} to #{new_registrant.email}"
|
||||
message = "Send RegistrantChangeMailer#notice email for domain #{domain.name} (##{domain.id}) to #{new_registrant.email}"
|
||||
logger.info(message)
|
||||
end
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ RSpec.describe DomainDeleteConfirmEmailJob 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')
|
||||
|
@ -20,7 +21,7 @@ RSpec.describe DomainDeleteConfirmEmailJob do
|
|||
end
|
||||
|
||||
it 'creates log record' do
|
||||
log_message = 'Send DomainDeleteMailer#confirm email for domain #1 to registrant@test.com'
|
||||
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)
|
||||
|
|
|
@ -9,6 +9,7 @@ RSpec.describe DomainDeleteForcedEmailJob do
|
|||
expect(Domain).to receive(:find).and_return(domain)
|
||||
allow(domain).to receive_messages(
|
||||
id: 1,
|
||||
name: 'test.com',
|
||||
registrar: 'registrar',
|
||||
registrant: 'registrant',
|
||||
primary_contact_emails: %w(test@test.com test@test.com))
|
||||
|
@ -20,7 +21,7 @@ RSpec.describe DomainDeleteForcedEmailJob do
|
|||
end
|
||||
|
||||
it 'creates log record' do
|
||||
log_message = 'Send DomainDeleteMailer#forced email for domain #1 to test@test.com, test@test.com'
|
||||
log_message = 'Send DomainDeleteMailer#forced email for domain test.com (#1) to test@test.com, test@test.com'
|
||||
|
||||
allow(DomainDeleteMailer).to receive(:forced).and_return(message)
|
||||
allow(message).to receive(:deliver_now)
|
||||
|
|
|
@ -10,6 +10,7 @@ RSpec.describe RegistrantChangeConfirmEmailJob do
|
|||
expect(Registrant).to receive(:find).and_return('new registrant')
|
||||
allow(domain).to receive_messages(
|
||||
id: 1,
|
||||
name: 'test.com',
|
||||
registrant_email: 'registrant@test.com',
|
||||
registrar: 'registrar',
|
||||
registrant: 'registrant')
|
||||
|
@ -22,7 +23,7 @@ RSpec.describe RegistrantChangeConfirmEmailJob do
|
|||
end
|
||||
|
||||
it 'creates log record' do
|
||||
log_message = 'Send RegistrantChangeMailer#confirm email for domain #1 to registrant@test.com'
|
||||
log_message = 'Send RegistrantChangeMailer#confirm email for domain test.com (#1) to registrant@test.com'
|
||||
|
||||
allow(RegistrantChangeMailer).to receive(:confirm).and_return(message)
|
||||
allow(message).to receive(:deliver_now)
|
||||
|
|
|
@ -4,6 +4,7 @@ RSpec.describe RegistrantChangeExpiredEmailJob do
|
|||
describe '#run' do
|
||||
let(:domain) { instance_double(Domain,
|
||||
id: 1,
|
||||
name: 'test.com',
|
||||
new_registrant_email: 'new-registrant@test.com',
|
||||
registrar: 'registrar',
|
||||
registrant: 'registrant')
|
||||
|
@ -20,7 +21,7 @@ RSpec.describe RegistrantChangeExpiredEmailJob do
|
|||
end
|
||||
|
||||
it 'creates log record' do
|
||||
log_message = 'Send RegistrantChangeMailer#expired email for domain #1 to new-registrant@test.com'
|
||||
log_message = 'Send RegistrantChangeMailer#expired email for domain test.com (#1) to new-registrant@test.com'
|
||||
|
||||
allow(RegistrantChangeMailer).to receive(:expired).and_return(message)
|
||||
allow(message).to receive(:deliver_now)
|
||||
|
|
|
@ -4,6 +4,7 @@ RSpec.describe RegistrantChangeNoticeEmailJob do
|
|||
describe '#run' do
|
||||
let(:domain) { instance_double(Domain,
|
||||
id: 1,
|
||||
name: 'test.com',
|
||||
registrant_email: 'registrant@test.com',
|
||||
registrar: 'registrar',
|
||||
registrant: 'registrant')
|
||||
|
@ -23,7 +24,7 @@ RSpec.describe RegistrantChangeNoticeEmailJob do
|
|||
end
|
||||
|
||||
it 'creates log record' do
|
||||
log_message = 'Send RegistrantChangeMailer#notice email for domain #1 to new-registrant@test.com'
|
||||
log_message = 'Send RegistrantChangeMailer#notice email for domain test.com (#1) to new-registrant@test.com'
|
||||
|
||||
allow(RegistrantChangeMailer).to receive(:notice).and_return(message)
|
||||
allow(message).to receive(:deliver_now)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue