X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/35658af99f09f2f6768583d65246429f789fc5a2..42c20b25e1325124b88e3b9b285544dc41122b56:/apps/workbench/test/controllers/projects_controller_test.rb diff --git a/apps/workbench/test/controllers/projects_controller_test.rb b/apps/workbench/test/controllers/projects_controller_test.rb index 0f79168901..2d379f8640 100644 --- a/apps/workbench/test/controllers/projects_controller_test.rb +++ b/apps/workbench/test/controllers/projects_controller_test.rb @@ -151,7 +151,7 @@ class ProjectsControllerTest < ActionController::TestCase end ['', ' asc', ' desc'].each do |direction| - test "projects#show tab partial orders correctly by #{direction}" do + test "projects#show tab partial orders correctly by created_at#{direction}" do _test_tab_content_order direction end end @@ -396,10 +396,7 @@ EOT end end - [ - [:admin, true], - [:active, false], - ].each do |user, expect_all_nodes| + [:admin, :active].each do |user| test "in dashboard other index page links as #{user}" do get :index, params: {}, session: session_for(user) @@ -409,14 +406,6 @@ EOT assert_includes @response.body, "href=\"#{path}\"" assert_includes @response.body, "All #{target}" end - - if expect_all_nodes - assert_includes @response.body, "href=\"/nodes\"" - assert_includes @response.body, "All nodes" - else - assert_not_includes @response.body, "href=\"/nodes\"" - assert_not_includes @response.body, "All nodes" - end end end @@ -534,12 +523,12 @@ EOT use_token user ctrl = ProjectsController.new current_user = User.find(api_fixture('users')[user]['uuid']) - my_starred_project = ctrl.send :my_starred_projects, current_user + my_starred_project = ctrl.send :my_starred_projects, current_user, '' assert_equal(size, my_starred_project.andand.size) ctrl2 = ProjectsController.new current_user = User.find(api_fixture('users')[user]['uuid']) - my_starred_project = ctrl2.send :my_starred_projects, current_user + my_starred_project = ctrl2.send :my_starred_projects, current_user, '' assert_equal(size, my_starred_project.andand.size) end end @@ -553,7 +542,7 @@ EOT use_token :project_viewer current_user = User.find(api_fixture('users')['project_viewer']['uuid']) ctrl = ProjectsController.new - my_starred_project = ctrl.send :my_starred_projects, current_user + my_starred_project = ctrl.send :my_starred_projects, current_user, '' assert_equal(0, my_starred_project.andand.size) # share it again @@ -571,7 +560,7 @@ EOT # verify that the project is again included in starred projects use_token :project_viewer ctrl = ProjectsController.new - my_starred_project = ctrl.send :my_starred_projects, current_user + my_starred_project = ctrl.send :my_starred_projects, current_user, '' assert_equal(1, my_starred_project.andand.size) end end