request and response have the same domain schema

This commit is contained in:
Oleg Hasjanov 2021-06-22 12:59:56 +03:00
parent 230fb301a7
commit 6f431232f4
7 changed files with 28 additions and 8 deletions

View file

@ -95,4 +95,10 @@ class EppTestCase < ActionDispatch::IntegrationTest
raise Exception.new('Wrong prefix')
end
end
# The prefix and version of the response are returned are these variants - res[:prefix] res[:version]
def parsing_schemas_prefix_and_version(response)
xml = response.gsub!(/(?<=>)(.*?)(?=<)/, &:strip)
xml.to_s.match(/xmlns:domain=\"https:\/\/epp.tld.ee\/schema\/(?<prefix>\w+-\w+)-(?<version>\w.\w).xsd/)
end
end