Skip to content

Commit

Permalink
test(enums): add some casing tests (#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
steebchen authored Nov 20, 2023
1 parent 8378fab commit 4bd40a9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/features/enums/enums_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ type Func func(t *testing.T, client *PrismaClient, ctx cx)
func TestEnums(t *testing.T) {
t.Parallel()

// casing test no-ops
_ = StuffLast7D
_ = StuffLast30D
_ = StuffSlack
_ = StuffLast7DAnd
_ = StuffLast30Dand
_ = StuffID

tests := []struct {
name string
before []string
Expand All @@ -28,15 +36,15 @@ func TestEnums(t *testing.T) {
admin := RoleAdmin
mod := RoleModerator

stuffCASING := StuffCasing
stuffCasing := StuffCasing
stuffDifferent := StuffDifferent
stuffHaHa := StuffHaHa
expected := &UserModel{
InnerUser: InnerUser{
ID: "123",
Role: admin,
RoleOpt: &mod,
Stuff1: &stuffCASING,
Stuff1: &stuffCasing,
Stuff2: &stuffDifferent,
Stuff3: &stuffHaHa,
},
Expand Down
6 changes: 6 additions & 0 deletions test/features/enums/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@ enum Stuff {
different
CASING
HaHa
last7d
last30D
last7dAnd
last30DAnd
Slack
id
}

0 comments on commit 4bd40a9

Please sign in to comment.