mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
Added registrant successful email confirmation #2557
This commit is contained in:
parent
9f2d87606d
commit
8102b8f1a2
11 changed files with 169 additions and 18 deletions
|
@ -112,4 +112,29 @@ describe DomainMailer do
|
|||
@mail.body.encoded.should =~ %r{registrant\/domain_delete_con} # somehowe delete_confirms not matching
|
||||
end
|
||||
end
|
||||
|
||||
describe 'registrant successfully changed confirmation' do
|
||||
before :all do
|
||||
@registrant = Fabricate(:registrant, email: 'test@example.com')
|
||||
@domain = Fabricate(:domain, registrant: @registrant)
|
||||
@domain.deliver_emails = true
|
||||
@mail = DomainMailer.registrant_updated(@domain)
|
||||
end
|
||||
|
||||
it 'should render email subject' do
|
||||
@mail.subject.should =~ /registreerija vahetus teostatud/
|
||||
end
|
||||
|
||||
it 'should have sender email' do
|
||||
@mail.from.should == ["noreply@internet.ee"]
|
||||
end
|
||||
|
||||
it 'should send to registrant email' do
|
||||
@mail.to.should == ["test@example.com"]
|
||||
end
|
||||
|
||||
it 'should render body' do
|
||||
@mail.body.encoded.should =~ /registreerija vahetuse taotlus on kinnitatud/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -182,6 +182,16 @@ describe Domain do
|
|||
@domain.force_delete_at.should be_nil
|
||||
end
|
||||
|
||||
it 'should set expired status and update outzone_at and delete_at' do
|
||||
domain = Fabricate(:domain)
|
||||
domain.statuses.should == ['ok']
|
||||
domain.set_expired
|
||||
domain.changes.keys.should == ['statuses', 'outzone_at', 'delete_at']
|
||||
domain.save
|
||||
|
||||
domain.statuses.should == ['expired']
|
||||
end
|
||||
|
||||
it 'should know its create price' do
|
||||
Fabricate(:pricelist, {
|
||||
category: 'ee',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue