X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8c66c387ddeb1fe5cc19f31fc0e4f24ed778b1f8..ad79a64bd1503e1e47d3849a00b894c4a6bc9810:/services/api/test/functional/arvados/v1/groups_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/groups_controller_test.rb b/services/api/test/functional/arvados/v1/groups_controller_test.rb index 40adbd2dfe..2e3d6b867b 100644 --- a/services/api/test/functional/arvados/v1/groups_controller_test.rb +++ b/services/api/test/functional/arvados/v1/groups_controller_test.rb @@ -1,4 +1,17 @@ require 'test_helper' class Arvados::V1::GroupsControllerTest < ActionController::TestCase + + test "attempt to delete group without read or write access" do + authorize_with :active + post :destroy, id: groups(:empty_lonely_group).uuid + assert_response 404 + end + + test "attempt to delete group without write access" do + authorize_with :active + post :destroy, id: groups(:all_users).uuid + assert_response 403 + end + end