Skip to content

Commit fa480cd

Browse files
committed
fixup test
1 parent 470c31c commit fa480cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/httpmw/authz_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/coder/coder/v2/coderd/coderdtest"
1212
"github.com/coder/coder/v2/coderd/database/dbauthz"
1313
"github.com/coder/coder/v2/coderd/httpmw"
14+
"github.com/coder/coder/v2/coderd/rbac"
1415
)
1516

1617
func TestAsAuthzSystem(t *testing.T) {
@@ -34,7 +35,7 @@ func TestAsAuthzSystem(t *testing.T) {
3435
actor, ok := dbauthz.ActorFromContext(req.Context())
3536
assert.True(t, ok, "actor should exist")
3637
assert.False(t, userActor.Equal(actor), "systemActor should not be the user actor")
37-
assert.Contains(t, actor.Roles.Names(), "system", "should have system role")
38+
assert.Contains(t, actor.Roles.Names(), rbac.RoleIdentifier{Name: "system"}, "should have system role")
3839
})
3940

4041
mwAssertUser := mwAssert(func(req *http.Request) {

0 commit comments

Comments
 (0)