mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
Refactor schema checking to custom assertion
This commit is contained in:
parent
920ce907cb
commit
3eb645a590
2 changed files with 8 additions and 4 deletions
|
@ -75,6 +75,13 @@ class EppTestCase < ActionDispatch::IntegrationTest
|
|||
assert schema_version >= version
|
||||
end
|
||||
|
||||
def assert_correct_against_schema(response_xml, message = nil)
|
||||
schema = EPP_ALL_SCHEMA
|
||||
|
||||
schema_validation_errors = schema.validate(response_xml)
|
||||
assert_equal 0, schema_validation_errors.size, message
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def prefix_schema_tag(prefix, response_xml)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue