Merge branch 'master' into 2767-doc-updates
[arvados.git] / apps / workbench / test / integration / logins_test.rb
index 84170dd33b6b8b98c9f68fb43ae3569901aa2689..6e5389e7cc11d0a4d6c7c4808023476346e9c978 100644 (file)
@@ -3,7 +3,7 @@ require 'test_helper'
 class LoginsTest < ActionDispatch::IntegrationTest
   test "login with api_token works after redirect" do
     visit page_with_token('active_trustedclient')
-    assert page.has_text? 'Recent jobs'
+    assert page.has_text?('Recent jobs'), "Missing 'Recent jobs' from page"
     assert_no_match(/\bapi_token=/, current_path)
   end
 
@@ -11,4 +11,12 @@ class LoginsTest < ActionDispatch::IntegrationTest
     visit page_with_token('expired_trustedclient')
     assert page.has_text? 'Log in'
   end
+
+  test "expired token yields login page, not error page" do
+    skip
+    visit page_with_token('expired_trustedclient')
+    # Even the error page has a "Log in" link. We should look for
+    # something that only appears the real login page.
+    assert page.has_text? 'Please log in'
+  end
 end