No need to validate input in tests anymore #2752

This commit is contained in:
Martin Lensment 2015-07-24 13:34:51 +03:00
parent e463fe4d70
commit cd9851df2f
2 changed files with 14 additions and 8 deletions

View file

@ -45,7 +45,13 @@ feature 'Contact', type: :feature do
visit '/registrar/contacts/new'
current_path.should == '/registrar/contacts/new'
fill_in 'depp_contact_ident', with: 'bic-ident'
fill_in 'depp_contact_ident', with: ''
fill_in 'depp_contact_name', with: 'Business Name Ltd'
fill_in 'depp_contact_email', with: 'example@example.com'
fill_in 'depp_contact_street', with: 'Example street 12'
fill_in 'depp_contact_city', with: 'Example City'
fill_in 'depp_contact_zip', with: '123456'
fill_in 'depp_contact_phone', with: '+372.12345678'
click_button 'Create'
current_path.should == '/registrar/contacts'

View file

@ -67,15 +67,15 @@ module Epp
def epp_plain_request(data, *args)
options = args.extract_options!
validate_input = options[:validate_input] != false # true by default
# validate_input = options[:validate_input] != false # true by default
validate_output = options[:validate_output] != false # true by default
if validate_input && @xsd
xml = Nokogiri::XML(data)
@xsd.validate(xml).each do |error|
fail Exception.new, error.to_s
end
end
# if validate_input && @xsd
# xml = Nokogiri::XML(data)
# @xsd.validate(xml).each do |error|
# fail Exception.new, error.to_s
# end
# end
res = parse_response(server.send_request(data))
if res