Contact change notification email content update #2558

This commit is contained in:
Priit Tark 2015-06-03 10:06:40 +03:00
parent 941538b924
commit 410914e16e
4 changed files with 53 additions and 11 deletions

View file

@ -99,6 +99,10 @@ describe Contact do
@contact.valid?
@contact.errors[:code].should == ['is too long (maximum is 100 characters)']
end
it 'should have no related domain descriptions' do
@contact.related_domain_descriptions.should == {}
end
end
context 'with valid attributes' do
@ -189,6 +193,22 @@ describe Contact do
# contact.statuses.map(&:value).should == %w(ok linked)
end
context 'as birthday' do
before do
@domain = Fabricate(:domain)
end
it 'should have related domain descriptions hash' do
contact = @domain.registrant
contact.related_domain_descriptions.should == { "#{@domain.name}" => [:registrant] }
end
it 'should have related domain descriptions hash' do
contact = @domain.contacts.first
contact.related_domain_descriptions.should == { "#{@domain.name}" => [:admin] }
end
end
context 'as birthday' do
before :all do
@contact.ident_type = 'birthday'