MCPcopy Create free account
hub / github.com/coder/coder / TestAISeat

Method TestAISeat

coderd/database/dbauthz/dbauthz_test.go:2061–2070  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2059}
2060
2061func (s *MethodTestSuite) TestAISeat() {
2062 s.Run("GetActiveAISeatCount", s.Mocked(func(dbm *dbmock.MockStore, _ *gofakeit.Faker, check *expects) {
2063 dbm.EXPECT().GetActiveAISeatCount(gomock.Any()).Return(int64(100), nil).AnyTimes()
2064 check.Args().Asserts(rbac.ResourceAiSeat, policy.ActionRead).Returns(int64(100))
2065 }))
2066 s.Run("UpsertAISeatState", s.Mocked(func(dbm *dbmock.MockStore, _ *gofakeit.Faker, check *expects) {
2067 dbm.EXPECT().UpsertAISeatState(gomock.Any(), gomock.Any()).Return(true, nil).AnyTimes()
2068 check.Args(database.UpsertAISeatStateParams{}).Asserts(rbac.ResourceAiSeat, policy.ActionCreate)
2069 }))
2070}
2071
2072func (s *MethodTestSuite) TestLicense() {
2073 s.Run("GetLicenses", s.Mocked(func(dbm *dbmock.MockStore, _ *gofakeit.Faker, check *expects) {

Callers

nothing calls this directly

Calls 8

MockedMethod · 0.95
ReturnsMethod · 0.80
AssertsMethod · 0.80
ArgsMethod · 0.80
RunMethod · 0.65
GetActiveAISeatCountMethod · 0.65
UpsertAISeatStateMethod · 0.65
EXPECTMethod · 0.45

Tested by

no test coverage detected