3 class LoginsTest < ActionDispatch::IntegrationTest
4 test "login with api_token works after redirect" do
5 visit page_with_token('active_trustedclient')
6 assert page.has_text?('Recent jobs'), "Missing 'Recent jobs' from page"
7 assert_no_match(/\bapi_token=/, current_path)
10 test "can't use expired token" do
11 visit page_with_token('expired_trustedclient')
12 assert page.has_text? 'Log in'