mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Error messages changes
This commit is contained in:
parent
e4ac417bde
commit
f6ce3b4c4e
4 changed files with 5 additions and 4 deletions
|
@ -17,7 +17,7 @@ class Domain < ActiveRecord::Base
|
||||||
|
|
||||||
has_and_belongs_to_many :nameservers
|
has_and_belongs_to_many :nameservers
|
||||||
|
|
||||||
validates :name_dirty, domain_name: true, uniqueness: { message: I18n.t('errors.messages.epp_domain_taken') }
|
validates :name_dirty, domain_name: true, uniqueness: { message: :epp_domain_taken }
|
||||||
validates :period, numericality: { only_integer: true, greater_than: 0, less_than: 100 }
|
validates :period, numericality: { only_integer: true, greater_than: 0, less_than: 100 }
|
||||||
validates :name, :owner_contact, presence: true
|
validates :name, :owner_contact, presence: true
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ en:
|
||||||
name:
|
name:
|
||||||
blank: 'Required parameter missing - name'
|
blank: 'Required parameter missing - name'
|
||||||
owner_contact:
|
owner_contact:
|
||||||
blank: 'Required parameter missing - owner contact'
|
blank: 'Required parameter missing - registrant'
|
||||||
admin_contacts:
|
admin_contacts:
|
||||||
blank: 'Required parameter missing - admin contact'
|
blank: 'Required parameter missing - admin contact'
|
||||||
|
|
||||||
|
@ -51,4 +51,4 @@ en:
|
||||||
epp_domain_taken: 'Domain name already exists'
|
epp_domain_taken: 'Domain name already exists'
|
||||||
epp_obj_does_not_exist: 'Object does not exist'
|
epp_obj_does_not_exist: 'Object does not exist'
|
||||||
epp_command_failed: 'Command failed'
|
epp_command_failed: 'Command failed'
|
||||||
epp_contact_not_found: "Contact was not found"
|
epp_contact_not_found: 'Contact was not found'
|
||||||
|
|
|
@ -62,6 +62,7 @@ describe 'EPP Domain', epp: true do
|
||||||
it 'does not create domain without contacts and registrant' do
|
it 'does not create domain without contacts and registrant' do
|
||||||
response = epp_request('domains/create_wo_contacts_and_registrant.xml')
|
response = epp_request('domains/create_wo_contacts_and_registrant.xml')
|
||||||
expect(response[:result_code]).to eq('2306')
|
expect(response[:result_code]).to eq('2306')
|
||||||
|
expect(response[:msg]).to eq('Required parameter missing - registrant')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ describe Domain do
|
||||||
expect(d.errors.messages).to match_array({
|
expect(d.errors.messages).to match_array({
|
||||||
name: ['Required parameter missing - name'],
|
name: ['Required parameter missing - name'],
|
||||||
period: ['is not a number'],
|
period: ['is not a number'],
|
||||||
owner_contact: ['Required parameter missing - owner contact']
|
owner_contact: ['Required parameter missing - registrant']
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue