updated application yml sample file for system tests

This commit is contained in:
Oleg Hasjanov 2021-06-18 14:04:27 +03:00
parent 285eb28ac6
commit 72b3fdebad
3 changed files with 29 additions and 33 deletions

View file

@ -61,21 +61,22 @@ module Depp
period = domain_params[:period].to_i.to_s
period_unit = domain_params[:period][-1].to_s
xml = if domain_params[:nameservers_attributes].select { |key, value| value['hostname'].present? }.any?
xml = if domain_params[:nameservers_attributes]
.select { |_key, value| value['hostname'].present? }.any?
epp_xml.create({
name: { value: domain_params[:name] },
period: { value: period, attrs: { unit: period_unit } },
ns: Domain.create_nameservers_hash(domain_params),
registrant: { value: domain_params[:registrant] },
_anonymus: Domain.create_contacts_hash(domain_params)
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
name: { value: domain_params[:name] },
period: { value: period, attrs: { unit: period_unit } },
ns: Domain.create_nameservers_hash(domain_params),
registrant: { value: domain_params[:registrant] },
_anonymus: Domain.create_contacts_hash(domain_params)
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
else
epp_xml.create({
name: { value: domain_params[:name] },
period: { value: period, attrs: { unit: period_unit } },
registrant: { value: domain_params[:registrant] },
_anonymus: Domain.create_contacts_hash(domain_params)
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
name: { value: domain_params[:name] },
period: { value: period, attrs: { unit: period_unit } },
registrant: { value: domain_params[:registrant] },
_anonymus: Domain.create_contacts_hash(domain_params)
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
end
current_user.request(xml)
@ -239,7 +240,9 @@ module Depp
if domain_params[:registrant] != old_domain_params[:registrant]
chg = [{ registrant: { value: domain_params[:registrant] } }] unless domain_params[:verified].present?
chg = [{ registrant: { value: domain_params[:registrant], attrs: { verified: 'yes' } } }] if domain_params[:verified]
if domain_params[:verified]
chg = [{ registrant: { value: domain_params[:registrant], attrs: { verified: 'yes' } } }]
end
end
add_arr = nil if add_arr.none?

View file

@ -199,6 +199,19 @@ test:
dnssec_resolver_ips: 8.8.8.8, 8.8.4.4
legal_documents_dir: 'test/fixtures/files'
openssl_config_path: 'test/fixtures/files/test_ca/openssl.cnf'
crl_dir: 'test/fixtures/files/test_ca/crl'
crl_path: 'test/fixtures/files/test_ca/crl/crl.pem'
ca_cert_path: 'test/fixtures/files/test_ca/certs/ca.crt.pem'
ca_key_path: 'test/fixtures/files/test_ca/private/ca.key.pem'
ca_key_password: 'password'
cert_path: 'test/fixtures/files/webclient/webclient.crt.pem'
key_path: 'test/fixtures/files/webclient/webclient.key.pem'
epp_hostname: 'epp_proxy'
epp_port: '700'
epp_sessions_per_registrar: '4'
# Airbrake // Errbit:
airbrake_host: "https://your-errbit-host.ee"
# airbrake_env defaults to Rails.env, can be left blank.

View file

@ -1,20 +0,0 @@
require 'application_system_test_case'
class Domainest < ApplicationSystemTestCase
setup do
@user = users(:api_bestnames)
@contact = contacts(:jack)
@domain = domains(:shop)
sign_in @user
end
def test_update_tech_contact
visit edit_registrar_domains_path + "?domain_name=#{@domain.name}"
fill_in 'domain_contacts_attributes_0_code_helper', with: "#{@contact.code} #{@contact.name}"
click_on 'Save'
assert_redirect_to info_registrar_domains_url(domain_name: @domain_params[:name])
end
end