generated from VLADIMIR/template
up
This commit is contained in:
@@ -28,4 +28,13 @@ func TestGetPermissionsAllowsAnonymousUsers(t *testing.T) {
|
||||
if len(rsp.GetPermissions()) == 0 {
|
||||
t.Fatal("authenticated permissions are empty")
|
||||
}
|
||||
|
||||
ctx = processor_jwt.ContextWithClaims(context.Background(), &processor_jwt.JWTClaims{Roles: []string{"admin"}})
|
||||
rsp, err = s.GetPermissions(ctx, &proto.GetPermissionsReq{})
|
||||
if err != nil {
|
||||
t.Fatalf("GetPermissions() for admin error = %v", err)
|
||||
}
|
||||
if len(rsp.GetPermissions()) == 0 {
|
||||
t.Fatal("admin permissions are empty")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user