X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e74ede4659428af77c50057d69a0d08e4e74a6ef..9d76f0c0fc0c35b70f3988695fcb253e1739e36b:/apps/workbench/test/functional/projects_controller_test.rb diff --git a/apps/workbench/test/functional/projects_controller_test.rb b/apps/workbench/test/functional/projects_controller_test.rb index ff569286ee..ae0cad09e3 100644 --- a/apps/workbench/test/functional/projects_controller_test.rb +++ b/apps/workbench/test/functional/projects_controller_test.rb @@ -38,17 +38,20 @@ class ProjectsControllerTest < ActionController::TestCase format: "json"}, session_for(:active)) assert_response :success - json_response = Oj.load(@response.body) assert_equal(uuid_list, json_response["success"]) end test "user with project read permission can't add permissions" do + share_uuid = api_fixture("users")["spectator"]["uuid"] post(:share_with, { id: api_fixture("groups")["aproject"]["uuid"], - uuids: [api_fixture("users")["spectator"]["uuid"]], + uuids: [share_uuid], format: "json"}, session_for(:project_viewer)) assert_response 422 + assert(json_response["errors"].andand. + any? { |msg| msg.start_with?("#{share_uuid}: ") }, + "JSON response missing properly formatted sharing error") end def user_can_manage(user_sym, group_key) @@ -82,4 +85,74 @@ class ProjectsControllerTest < ActionController::TestCase test "viewer can't manage asubproject" do refute user_can_manage(:project_viewer, "asubproject") end + + test 'projects#show tab infinite scroll partial obeys limit' do + get_contents_rows(limit: 1, filters: [['uuid','is_a',['arvados#job']]]) + assert_response :success + assert_equal(1, json_response['content'].scan('