mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
Refactor emails #2786
This commit is contained in:
parent
1c7febf47a
commit
e876bf59a5
4 changed files with 34 additions and 32 deletions
|
@ -4,8 +4,7 @@ describe ContactMailer do
|
|||
describe 'email changed notification when delivery turned off' do
|
||||
before :all do
|
||||
@contact = Fabricate(:contact, email: 'test@example.ee')
|
||||
@contact.email = 'test@example.com' # new email
|
||||
@mail = ContactMailer.email_updated(@contact)
|
||||
@mail = ContactMailer.email_updated('test@example.com', @contact)
|
||||
end
|
||||
|
||||
it 'should not render email subject' do
|
||||
|
@ -31,8 +30,7 @@ describe ContactMailer do
|
|||
@contact = @domain.registrant
|
||||
@contact.reload # until figured out why registrant_domains not loaded
|
||||
@contact.deliver_emails = true
|
||||
@contact.email = 'test@example.org' # new email
|
||||
@mail = ContactMailer.email_updated(@contact)
|
||||
@mail = ContactMailer.email_updated('info@example.org', @contact)
|
||||
end
|
||||
|
||||
it 'should render email subject' do
|
||||
|
@ -43,9 +41,8 @@ describe ContactMailer do
|
|||
@mail.from.should == ["noreply@internet.ee"]
|
||||
end
|
||||
|
||||
it 'should have both old and new receiver email' do
|
||||
@mail.to.size.should == 2
|
||||
@mail.to.include? "test@example.org"
|
||||
it 'should send to info email' do
|
||||
@mail.to.should == ['info@example.org']
|
||||
end
|
||||
|
||||
it 'should render body' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue