Merge branch 'master' of git.curoverse.com:arvados into 1968-monitor-disk-usage
[arvados.git] / apps / workbench / test / integration / logins_test.rb
1 require 'test_helper'
2
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)
8   end
9
10   test "can't use expired token" do
11     visit page_with_token('expired_trustedclient')
12     assert page.has_text? 'Log in'
13   end
14 end