mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
parent
bb108efedd
commit
fa52001be6
141 changed files with 1388 additions and 1664 deletions
|
@ -2,22 +2,26 @@ require 'test_helper'
|
|||
|
||||
class EppLogoutTest < EppTestCase
|
||||
def test_success_response
|
||||
post epp_logout_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
post epp_logout_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
assert_epp_response :completed_successfully_ending_session
|
||||
end
|
||||
|
||||
def test_ends_current_session
|
||||
post epp_logout_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
post epp_logout_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
assert_nil EppSession.find_by(session_id: 'api_bestnames')
|
||||
end
|
||||
|
||||
def test_keeps_other_sessions_intact
|
||||
post epp_logout_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
post epp_logout_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
assert EppSession.find_by(session_id: 'api_goodnames')
|
||||
end
|
||||
|
||||
def test_anonymous_user
|
||||
post epp_logout_path, { frame: request_xml }, { 'HTTP_COOKIE' => 'session=non-existent' }
|
||||
post epp_logout_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=non-existent' }
|
||||
assert_epp_response :authorization_error
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue