Skip to content

Commit 4415b6b

Browse files
committed
Start license unit tests
1 parent 0da03c6 commit 4415b6b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

coderd/authzquery/license_test.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package authzquery_test
2+
3+
import (
4+
"context"
5+
"testing"
6+
7+
"github.com/google/uuid"
8+
"github.com/stretchr/testify/require"
9+
10+
"github.com/coder/coder/coderd/database"
11+
"github.com/coder/coder/coderd/rbac"
12+
)
13+
14+
func (suite *MethodTestSuite) TestLicense() {
15+
suite.Run("GetLicenses", func() {
16+
suite.RunMethodTest(func(t *testing.T, db database.Store) MethodCase {
17+
l, err := db.InsertLicense(context.Background(), database.InsertLicenseParams{
18+
Uuid: uuid.NullUUID{UUID: uuid.New(), Valid: true},
19+
})
20+
require.NoError(t, err)
21+
return methodCase(inputs(), asserts(l, rbac.ActionRead))
22+
})
23+
})
24+
}

0 commit comments

Comments
 (0)