We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42b42ab commit 0efe72cCopy full SHA for 0efe72c
coderd/rbac/builtin_test.go
@@ -1,6 +1,7 @@
1
package rbac_test
2
3
import (
4
+ "fmt"
5
"testing"
6
7
"github.com/google/uuid"
@@ -60,3 +61,23 @@ func TestIsOrgRole(t *testing.T) {
60
61
})
62
}
63
64
+
65
+func TestListRoles(t *testing.T) {
66
+ t.Parallel()
67
68
+ // If this test is ever failing, just update the list to the roles
69
+ // expected from the builtin set.
70
+ require.ElementsMatch(t, []string{
71
+ "admin",
72
+ "member",
73
+ "auditor",
74
+ },
75
+ rbac.SiteRoles())
76
77
+ orgID := uuid.New()
78
79
+ fmt.Sprintf("organization-admin:%s", orgID.String()),
80
+ fmt.Sprintf("organization-member:%s", orgID.String()),
81
82
+ rbac.OrganizationRoles(orgID))
83
+}
0 commit comments