X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e59b42354a10079ecd579a1dbe53c39a20d05313..c398b7d60aedab0a7b6f99cfee9e631bd66c93cd:/apps/workbench/test/controllers/users_controller_test.rb
diff --git a/apps/workbench/test/controllers/users_controller_test.rb b/apps/workbench/test/controllers/users_controller_test.rb
index f439d6eab2..71354b82f3 100644
--- a/apps/workbench/test/controllers/users_controller_test.rb
+++ b/apps/workbench/test/controllers/users_controller_test.rb
@@ -32,7 +32,7 @@ class UsersControllerTest < ActionController::TestCase
end
test "show repositories with read, write, or manage permission" do
- get :manage_account, {}, session_for(:active)
+ get :repositories, {id: api_fixture("users")['active']['uuid']}, session_for(:active)
assert_response :success
repos = assigns(:my_repositories)
assert repos
@@ -43,7 +43,7 @@ class UsersControllerTest < ActionController::TestCase
end
test "show repositories lists linked as well as owned repositories" do
- get :manage_account, {}, session_for(:active)
+ get :repositories, {id: api_fixture("users")['active']['uuid']}, session_for(:active)
assert_response :success
repos = assigns(:my_repositories)
assert repos
@@ -85,16 +85,16 @@ class UsersControllerTest < ActionController::TestCase
active_user = api_fixture('users','active')
get :index, {}, session_for(username)
if username == 'admin'
- assert_match /Home<\/a.*./, @response.body
- assert_match /Home<\/a.*./, @response.body
- assert_match /Home<\/a>/, @response.body
+ assert_match /Home<\/a>/, @response.body
+ assert_match /href="\/users\/#{admin_user['uuid']}" title="show user"><\/i> Show<\/a/, @response.body
+ assert_match /href="\/users\/#{active_user['uuid']}" title="show user"><\/i> Show<\/a/, @response.body
assert_includes @response.body, admin_user['email']
assert_includes @response.body, active_user['email']
else
- refute_match /a href=.*Home<.*\/a.*./, @response.body
- refute_match //, @response.body
+ refute_match /href="\/users\/#{admin_user['uuid']}" title="show user"><\/i> Show<\/a/, @response.body
+ assert_match /href="\/users\/#{active_user['uuid']}" title="show user"><\/i> Show<\/a/, @response.body
assert_includes @response.body, active_user['email']
end
end