Skip to content

Commit 82e1582

Browse files
committed
fix dbauthz tests
1 parent c8e0fb2 commit 82e1582

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2907,6 +2907,18 @@ func (s *MethodTestSuite) TestSystemFunctions() {
29072907
}
29082908
check.Args(build.ID).Asserts(rbac.ResourceSystem, policy.ActionRead).Returns(rows)
29092909
}))
2910+
s.Run("InsertWorkspaceModule", s.Subtest(func(db database.Store, check *expects) {
2911+
j := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{
2912+
Type: database.ProvisionerJobTypeWorkspaceBuild,
2913+
})
2914+
check.Args(database.InsertWorkspaceModuleParams{
2915+
JobID: j.ID,
2916+
Transition: database.WorkspaceTransitionStart,
2917+
}).Asserts(rbac.ResourceSystem, policy.ActionCreate)
2918+
}))
2919+
s.Run("GetWorkspaceModulesByJobID", s.Subtest(func(db database.Store, check *expects) {
2920+
check.Args(uuid.New()).Asserts(rbac.ResourceSystem, policy.ActionRead)
2921+
}))
29102922
}
29112923

29122924
func (s *MethodTestSuite) TestNotifications() {

0 commit comments

Comments
 (0)