mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +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 EppLoginSessionLimitTest < ApplicationIntegrationTest
|
||||
class EppLoginSessionLimitTest < EppTestCase
|
||||
setup do
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
EppSession.delete_all
|
||||
|
@ -16,9 +16,7 @@ class EppLoginSessionLimitTest < ApplicationIntegrationTest
|
|||
assert_difference 'EppSession.count' do
|
||||
post '/epp/session/login', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=new_session_id' }
|
||||
end
|
||||
|
||||
assert Nokogiri::XML(response.body).at_css('result[code="1000"]')
|
||||
assert_equal 1, Nokogiri::XML(response.body).css('result').size
|
||||
assert_epp_response :completed_successfully
|
||||
end
|
||||
|
||||
def test_reached
|
||||
|
@ -31,8 +29,7 @@ class EppLoginSessionLimitTest < ApplicationIntegrationTest
|
|||
assert_no_difference 'EppSession.count' do
|
||||
post '/epp/session/login', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=new_session_id' }
|
||||
end
|
||||
|
||||
assert Nokogiri::XML(response.body).at_css('result[code="2501"]')
|
||||
assert_epp_response :authentication_error_server_closing_connection
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue