1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 require 'integration_helper'
7 class LoginsTest < ActionDispatch::IntegrationTest
12 test "login with api_token works after redirect" do
13 visit page_with_token('active_trustedclient')
14 assert page.has_text?('Recent processes'), "Missing 'Recent processes' from page"
15 assert_no_match(/\bapi_token=/, current_path)
18 test "trying to use expired token redirects to login page" do
19 visit page_with_token('expired_trustedclient')
20 buttons = all("button.btn", text: /Log in/)
21 assert_equal(1, buttons.size, "Failed to find one login button")