mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Improve ContactMailer
- Add detailed registrar info - Refactor contact domain list - Fix english translation #480
This commit is contained in:
parent
37004c24ba
commit
49552fc67e
11 changed files with 220 additions and 37 deletions
|
@ -40,6 +40,21 @@ RSpec.describe RegistrantPresenter do
|
|||
end
|
||||
end
|
||||
|
||||
describe '#domain_names_with_roles' do
|
||||
before :example do
|
||||
roles = %i[registrant admin_domain_contact tech_domain_contact]
|
||||
allow(registrant).to receive(:domain_names_with_roles)
|
||||
.and_return({ 'test.com' => roles,
|
||||
'test.org' => %i[registrant] })
|
||||
end
|
||||
|
||||
it 'returns domain names with unique roles in current locale by default' do
|
||||
text = "test.com (Registrant, Administrative contact, Technical contact)" \
|
||||
"\ntest.org (Registrant)"
|
||||
expect(presenter.domain_names_with_roles).to eq(text)
|
||||
end
|
||||
end
|
||||
|
||||
registrant_delegatable_attributes = %i(
|
||||
name
|
||||
ident
|
||||
|
@ -52,6 +67,7 @@ RSpec.describe RegistrantPresenter do
|
|||
zip
|
||||
id_code
|
||||
reg_no
|
||||
used?
|
||||
)
|
||||
|
||||
registrant_delegatable_attributes.each do |attr_name|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue