mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 11:38:30 +02:00
Introduce custom assertion
This commit is contained in:
parent
5939da366e
commit
348e6e5d7a
54 changed files with 378 additions and 389 deletions
|
@ -1,6 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EppContactUpdateBaseTest < ActionDispatch::IntegrationTest
|
||||
class EppContactUpdateBaseTest < EppTestCase
|
||||
include ActionMailer::TestHelper
|
||||
|
||||
setup do
|
||||
|
@ -40,9 +40,7 @@ class EppContactUpdateBaseTest < ActionDispatch::IntegrationTest
|
|||
post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
@contact.reload
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '1000', response_xml.at_css('result')[:code]
|
||||
assert_equal 1, response_xml.css('result').size
|
||||
assert_epp_response :completed_successfully
|
||||
assert_equal 'new name', @contact.name
|
||||
assert_equal 'new-email@inbox.test', @contact.email
|
||||
assert_equal '+123.4', @contact.phone
|
||||
|
@ -158,8 +156,7 @@ class EppContactUpdateBaseTest < ActionDispatch::IntegrationTest
|
|||
|
||||
post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '2303', response_xml.at_css('result')[:code]
|
||||
assert_epp_response :object_does_not_exist
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue