mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 07:34:45 +02:00
Add base tests & make domain crID optional
This commit is contained in:
parent
3eb645a590
commit
f2f56d8350
2 changed files with 5 additions and 5 deletions
|
@ -41,7 +41,7 @@ xml.epp_head do
|
|||
|
||||
xml.tag!('domain:clID', @domain.registrar.code)
|
||||
|
||||
xml.tag!('domain:crID', @domain.cr_id)
|
||||
xml.tag!('domain:crID', @domain.cr_id) if @domain.cr_id.present?
|
||||
xml.tag!('domain:crDate', @domain.created_at.try(:iso8601))
|
||||
|
||||
if @domain.updated_at > @domain.created_at
|
||||
|
|
|
@ -144,10 +144,7 @@ class EppDomainInfoBaseTest < EppTestCase
|
|||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
schema = EPP_ALL_SCHEMA
|
||||
|
||||
schema_validation_errors = schema.validate(response_xml)
|
||||
assert_equal 0, schema_validation_errors.size
|
||||
assert_correct_against_schema response_xml
|
||||
end
|
||||
|
||||
def test_reveals_transfer_code_when_domain_is_owned_by_current_user
|
||||
|
@ -173,6 +170,7 @@ class EppDomainInfoBaseTest < EppTestCase
|
|||
assert_equal '65078d5',
|
||||
response_xml.at_xpath('//domain:authInfo/domain:pw',
|
||||
'domain' => Xsd::Schema.filename(for_prefix: 'domain-ee').to_s).text
|
||||
assert_correct_against_schema response_xml
|
||||
end
|
||||
|
||||
# Transfer code is the only info we conceal from other registrars, hence a bit oddly-looking
|
||||
|
@ -203,6 +201,7 @@ class EppDomainInfoBaseTest < EppTestCase
|
|||
assert_equal '65078d5',
|
||||
response_xml.at_xpath('//domain:authInfo/domain:pw',
|
||||
'domain' => Xsd::Schema.filename(for_prefix: 'domain-ee').to_s).text
|
||||
assert_correct_against_schema response_xml
|
||||
end
|
||||
|
||||
def test_conceals_transfer_code_when_domain_is_not_owned_by_current_user
|
||||
|
@ -226,6 +225,7 @@ class EppDomainInfoBaseTest < EppTestCase
|
|||
headers: { 'HTTP_COOKIE' => 'session=api_goodnames' }
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_correct_against_schema response_xml
|
||||
assert_nil response_xml.at_xpath('//domain:authInfo/domain:pw',
|
||||
'domain' => Xsd::Schema.filename(for_prefix: 'domain-ee').to_s)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue