mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Fixed rubocop errors
This commit is contained in:
parent
e991ab36f9
commit
e917ba5166
2 changed files with 5 additions and 7 deletions
|
@ -10,7 +10,7 @@ module Epp::ContactsHelper
|
||||||
# FIXME: Update returns 2303 update multiple times
|
# FIXME: Update returns 2303 update multiple times
|
||||||
code = params_hash['epp']['command']['update']['update'][:id]
|
code = params_hash['epp']['command']['update']['update'][:id]
|
||||||
@contact = Contact.where(code: code).first
|
@contact = Contact.where(code: code).first
|
||||||
#if update_rights? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))
|
# if update_rights? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))
|
||||||
if owner? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))
|
if owner? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))
|
||||||
render 'epp/contacts/update'
|
render 'epp/contacts/update'
|
||||||
else
|
else
|
||||||
|
@ -68,7 +68,7 @@ module Epp::ContactsHelper
|
||||||
def validate_contact_update_request
|
def validate_contact_update_request
|
||||||
@ph = params_hash['epp']['command']['update']['update']
|
@ph = params_hash['epp']['command']['update']['update']
|
||||||
update_attrs_present?
|
update_attrs_present?
|
||||||
#xml_attrs_present?(@ph, [['id'], %w(authInfo pw)])
|
# xml_attrs_present?(@ph, [['id'], %w(authInfo pw)])
|
||||||
xml_attrs_present?(@ph, [['id']])
|
xml_attrs_present?(@ph, [['id']])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -152,9 +152,7 @@ describe 'EPP Contact', epp: true do
|
||||||
expect(response[:results][0][:msg]).to eq('Required parameter missing: add, rem or chg')
|
expect(response[:results][0][:msg]).to eq('Required parameter missing: add, rem or chg')
|
||||||
expect(response[:results][1][:result_code]).to eq('2003')
|
expect(response[:results][1][:result_code]).to eq('2003')
|
||||||
expect(response[:results][1][:msg]).to eq('Required parameter missing: id')
|
expect(response[:results][1][:msg]).to eq('Required parameter missing: id')
|
||||||
expect(response[:results][2][:result_code]).to eq('2003')
|
expect(response[:results].count).to eq 2
|
||||||
expect(response[:results][2][:msg]).to eq('Required parameter missing: pw')
|
|
||||||
expect(response[:results].count).to eq 3
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'fails with wrong authentication info' do
|
it 'fails with wrong authentication info' do
|
||||||
|
@ -162,8 +160,8 @@ describe 'EPP Contact', epp: true do
|
||||||
|
|
||||||
response = epp_request(update_contact_xml({ id: { value: 'sh8013' } }), :xml, :elkdata)
|
response = epp_request(update_contact_xml({ id: { value: 'sh8013' } }), :xml, :elkdata)
|
||||||
|
|
||||||
expect(response[:msg]).to eq('Authentication error')
|
expect(response[:msg]).to eq('Authorization error')
|
||||||
expect(response[:result_code]).to eq('2200')
|
expect(response[:result_code]).to eq('2201')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'is succesful' do
|
it 'is succesful' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue