projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '3463-make-sharing-dialog-with-users-more-useful' closes #3463
[arvados.git]
/
apps
/
workbench
/
test
/
integration
/
logins_test.rb
diff --git
a/apps/workbench/test/integration/logins_test.rb
b/apps/workbench/test/integration/logins_test.rb
index 185d9cb017f55ee66412d7df5e616bc96d55a881..9daf831810de1253496f6c91ee6a931525b5c765 100644
(file)
--- a/
apps/workbench/test/integration/logins_test.rb
+++ b/
apps/workbench/test/integration/logins_test.rb
@@
-1,4
+1,4
@@
-require '
test
_helper'
+require '
integration
_helper'
class LoginsTest < ActionDispatch::IntegrationTest
test "login with api_token works after redirect" do
class LoginsTest < ActionDispatch::IntegrationTest
test "login with api_token works after redirect" do
@@
-7,8
+7,12
@@
class LoginsTest < ActionDispatch::IntegrationTest
assert_no_match(/\bapi_token=/, current_path)
end
assert_no_match(/\bapi_token=/, current_path)
end
- test "
can't use expired token
" do
+ test "
trying to use expired token redirects to login page
" do
visit page_with_token('expired_trustedclient')
visit page_with_token('expired_trustedclient')
- assert page.has_text? 'Log in'
+ buttons = all("a.btn", text: /Log in/)
+ assert_equal(1, buttons.size, "Failed to find one login button")
+ login_link = buttons.first[:href]
+ assert_match(%r{//[^/]+/login}, login_link)
+ assert_no_match(/\bapi_token=/, login_link)
end
end
end
end