From cd9851df2f9caabb16a0541e5b381228e45d9ece Mon Sep 17 00:00:00 2001 From: Martin Lensment Date: Fri, 24 Jul 2015 13:34:51 +0300 Subject: [PATCH] No need to validate input in tests anymore #2752 --- spec/features/registrar/contact_spec.rb | 8 +++++++- spec/support/epp.rb | 14 +++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/spec/features/registrar/contact_spec.rb b/spec/features/registrar/contact_spec.rb index 150103559..bf0ebcda4 100644 --- a/spec/features/registrar/contact_spec.rb +++ b/spec/features/registrar/contact_spec.rb @@ -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' diff --git a/spec/support/epp.rb b/spec/support/epp.rb index 698284735..8ec87c576 100644 --- a/spec/support/epp.rb +++ b/spec/support/epp.rb @@ -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