mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
Fix EPP code rspec matcher
This commit is contained in:
parent
cee4c84edd
commit
9a154d5918
1 changed files with 6 additions and 2 deletions
|
@ -11,7 +11,11 @@ module Matchers
|
||||||
end
|
end
|
||||||
|
|
||||||
def failure_message
|
def failure_message
|
||||||
"Expected EPP code of #{expected}, got #{actual} (#{description})"
|
"Expected EPP code of #{expected}, got #{actual} (#{code_description})"
|
||||||
|
end
|
||||||
|
|
||||||
|
def description
|
||||||
|
"should have EPP code of #{expected}"
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -23,7 +27,7 @@ module Matchers
|
||||||
xml_document.xpath('//xmlns:result').first['code'].to_i
|
xml_document.xpath('//xmlns:result').first['code'].to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
def description
|
def code_description
|
||||||
xml_document.css('result msg').text
|
xml_document.css('result msg').text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue