@@ -1247,7 +1247,7 @@ func (s *MethodTestSuite) TestUser() {
1247
1247
s .Run ("CustomRoles" , s .Subtest (func (db database.Store , check * expects ) {
1248
1248
check .Args (database.CustomRolesParams {}).Asserts (rbac .ResourceAssignRole , policy .ActionRead ).Returns ([]database.CustomRole {})
1249
1249
}))
1250
- s .Run ("DeleteCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
1250
+ s .Run ("Organization/ DeleteCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
1251
1251
customRole := dbgen .CustomRole (s .T (), db , database.CustomRole {
1252
1252
OrganizationID : uuid.NullUUID {
1253
1253
UUID : uuid .New (),
@@ -1260,6 +1260,18 @@ func (s *MethodTestSuite) TestUser() {
1260
1260
}).Asserts (
1261
1261
rbac .ResourceAssignOrgRole .InOrg (customRole .OrganizationID .UUID ), policy .ActionDelete )
1262
1262
}))
1263
+ s .Run ("Site/DeleteCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
1264
+ customRole := dbgen .CustomRole (s .T (), db , database.CustomRole {
1265
+ OrganizationID : uuid.NullUUID {
1266
+ UUID : uuid .Nil ,
1267
+ Valid : false ,
1268
+ },
1269
+ })
1270
+ check .Args (database.DeleteCustomRoleParams {
1271
+ Name : customRole .Name ,
1272
+ }).Asserts (
1273
+ rbac .ResourceAssignRole , policy .ActionDelete )
1274
+ }))
1263
1275
s .Run ("Blank/UpsertCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
1264
1276
// Blank is no perms in the role
1265
1277
check .Args (database.UpsertCustomRoleParams {
0 commit comments