mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
add sign_out sign_in function for epp_log
This commit is contained in:
parent
7122a17cc9
commit
9ab64ae6b9
1 changed files with 39 additions and 1 deletions
|
@ -7,14 +7,52 @@ class AdminEppLogsIntegrationTest < ApplicationSystemTestCase
|
||||||
sign_in users(:admin)
|
sign_in users(:admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# def test_helper_test
|
||||||
|
# user = users(:admin)
|
||||||
|
# new_session_id = 'new-session-id'
|
||||||
|
|
||||||
|
# request_xml = <<-XML
|
||||||
|
# <?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
# <epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
|
||||||
|
# <command>
|
||||||
|
# <login>
|
||||||
|
# <clID>#{user.username}</clID>
|
||||||
|
# <pw>#{user.plain_text_password}</pw>
|
||||||
|
# <options>
|
||||||
|
# <version>1.0</version>
|
||||||
|
# <lang>en</lang>
|
||||||
|
# </options>
|
||||||
|
# <svcs>
|
||||||
|
# <objURI>https://epp.tld.ee/schema/domain-eis-1.0.xsd</objURI>
|
||||||
|
# <objURI>https://epp.tld.ee/schema/contact-ee-1.1.xsd</objURI>
|
||||||
|
# <objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
|
||||||
|
# <objURI>urn:ietf:params:xml:ns:keyrelay-1.0</objURI>
|
||||||
|
# </svcs>
|
||||||
|
# </login>
|
||||||
|
# </command>
|
||||||
|
# </epp>
|
||||||
|
# XML
|
||||||
|
# assert_difference 'EppSession.count' do
|
||||||
|
# post '/epp/session/login', params: { frame: request_xml },
|
||||||
|
# headers: { 'HTTP_COOKIE' => "session=#{new_session_id}" }
|
||||||
|
# end
|
||||||
|
# assert_epp_response :completed_successfully
|
||||||
|
# session = EppSession.last
|
||||||
|
# assert_equal new_session_id, session.session_id
|
||||||
|
# assert_equal user, session.user
|
||||||
|
# end
|
||||||
|
|
||||||
def test_visit_epp_logs_page
|
def test_visit_epp_logs_page
|
||||||
visit admin_epp_logs_path
|
visit admin_epp_logs_path
|
||||||
assert_text 'EPP log'
|
assert_text 'EPP log'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_show_epp_log_page
|
def test_show_epp_log_page
|
||||||
|
sign_out users(:admin)
|
||||||
|
sign_in users(:admin)
|
||||||
visit admin_epp_logs_path
|
visit admin_epp_logs_path
|
||||||
find(:css, ".table > tbody:nth-child(2) > tr:nth-child(1) > td:nth-child(1) > a:nth-child(1)", match: :first).click
|
puts find(:xpath, "//body", match: :first).native
|
||||||
|
find(:xpath, "//tbody/tr/td/a", match: :first).click
|
||||||
assert_text 'Details'
|
assert_text 'Details'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue