Rubocop style fixes

This commit is contained in:
Andres Keskküla 2014-11-24 11:11:54 +02:00
parent b8584de4d6
commit ea2b64bc69
3 changed files with 15 additions and 18 deletions

View file

@ -58,8 +58,7 @@ module Epp::ContactsHelper
xml_attrs_present?(@ph, [%w(postalInfo name), %w(postalInfo addr city), %w(postalInfo addr cc), xml_attrs_present?(@ph, [%w(postalInfo name), %w(postalInfo addr city), %w(postalInfo addr cc),
%w(ident), %w(voice), %w(email)]) %w(ident), %w(voice), %w(email)])
epp_errors.empty? # unless @ph['postalInfo'].is_a?(Hash) || @ph['postalInfo'].is_a?(Array)
return epp_errors.empty? #unless @ph['postalInfo'].is_a?(Hash) || @ph['postalInfo'].is_a?(Array)
# (epp_errors << Address.validate_postal_info_types(parsed_frame)).flatten! # (epp_errors << Address.validate_postal_info_types(parsed_frame)).flatten!
# xml_attrs_array_present?(@ph['postalInfo'], [%w(name), %w(addr city), %w(addr cc)]) # xml_attrs_array_present?(@ph['postalInfo'], [%w(name), %w(addr city), %w(addr cc)])

View file

@ -116,7 +116,7 @@ describe 'EPP Contact', epp: true do
it 'fails with wrong authentication info' do it 'fails with wrong authentication info' do
Fabricate(:contact, code: 'sh8013', auth_info: 'password_wrong') Fabricate(:contact, code: 'sh8013', auth_info: 'password_wrong')
response = epp_request(update_contact_xml({id: { value: 'sh8013'}}), :xml, :elkdata ) #('contacts/update.xml') response = epp_request(update_contact_xml({ id: { value: 'sh8013' } }), :xml, :elkdata)
expect(response[:msg]).to eq('Authorization error') expect(response[:msg]).to eq('Authorization error')
expect(response[:result_code]).to eq('2201') expect(response[:result_code]).to eq('2201')

View file

@ -69,10 +69,8 @@ module EppContactXmlHelper
</command> </command>
</epp>' </epp>'
end end
end end
RSpec.configure do |c| RSpec.configure do |c|
c.include EppContactXmlHelper c.include EppContactXmlHelper
end end