mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
Added email pynicode support #2884
This commit is contained in:
parent
1b501dd053
commit
84d8b54c69
5 changed files with 48 additions and 13 deletions
|
@ -1,6 +1,10 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe ContactMailer do
|
||||
before :all do
|
||||
Fabricate(:zonefile_setting, origin: 'ee')
|
||||
end
|
||||
|
||||
describe 'email changed notification when delivery turned off' do
|
||||
before :all do
|
||||
@contact = Fabricate(:contact, email: 'test@example.ee')
|
||||
|
@ -26,7 +30,6 @@ describe ContactMailer do
|
|||
|
||||
describe 'email changed notification' do
|
||||
before :all do
|
||||
Fabricate(:zonefile_setting, origin: 'ee')
|
||||
@domain = Fabricate(:domain)
|
||||
@contact = @domain.registrant
|
||||
@contact.reload # until figured out why registrant_domains not loaded
|
||||
|
@ -50,4 +53,30 @@ describe ContactMailer do
|
|||
@mail.body.encoded.should =~ /Kontaktandmed:/
|
||||
end
|
||||
end
|
||||
|
||||
describe 'email with pynicode' do
|
||||
before :all do
|
||||
@domain = Fabricate(:domain)
|
||||
@contact = @domain.registrant
|
||||
@contact.reload # until figured out why registrant_domains not loaded
|
||||
@contact.deliver_emails = true
|
||||
@mail = ContactMailer.email_updated('info@ääöü.org', @contact)
|
||||
end
|
||||
|
||||
it 'should render email subject' do
|
||||
@mail.subject.should =~ /Teie domeenide kontakt epostiaadress on muutunud/
|
||||
end
|
||||
|
||||
it 'should have sender email' do
|
||||
@mail.from.should == ["noreply@internet.ee"]
|
||||
end
|
||||
|
||||
it 'should send to info email' do
|
||||
@mail.to.should == ['info@xn--4caa8cya.org']
|
||||
end
|
||||
|
||||
it 'should render body' do
|
||||
@mail.body.encoded.should =~ /Kontaktandmed:/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue