Merge branch 'master' into 2505-update-docs
[arvados.git] / services / api / test / functional / arvados / v1 / groups_controller_test.rb
index 40adbd2dfec70afeb35db213147eab4ca3ef404a..2e3d6b867b7313bd6d92c3303ce33d658b5d2266 100644 (file)
@@ -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