Introduce custom assertion

This commit is contained in:
Artur Beljajev 2019-09-03 18:15:58 +03:00
parent 5939da366e
commit 348e6e5d7a
54 changed files with 378 additions and 389 deletions

View 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