mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36:22 +02:00
Introduce custom assertion
This commit is contained in:
parent
5939da366e
commit
348e6e5d7a
54 changed files with 378 additions and 389 deletions
14
test/support/assertions/epp_assertions.rb
Normal file
14
test/support/assertions/epp_assertions.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
module Assertions
|
||||
module EppAssertions
|
||||
def assert_epp_response(code_key, message = nil)
|
||||
assert epp_response.code?(Epp::Response::Result::Code.key(code_key)), message
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def epp_response
|
||||
@epp_response = Epp::Response.xml(response.body) unless @epp_response
|
||||
@epp_response
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue