Skip to content

Commit 7af0b60

Browse files
committed
fix: update test to check for accurate count
1 parent 24332f4 commit 7af0b60

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,17 @@ func (s *MethodTestSuite) TestOrganization() {
999999
LimitOpt: 0,
10001000
}).Asserts(
10011001
rbac.ResourceOrganizationMember.InOrg(o.ID), policy.ActionRead,
1002-
).Returns(mem)
1002+
).Returns([]database.PaginatedOrganizationMembersRow{
1003+
{
1004+
OrganizationMember: mem,
1005+
Username: u.Username,
1006+
AvatarURL: u.AvatarURL,
1007+
Name: u.Name,
1008+
Email: u.Email,
1009+
GlobalRoles: u.RBACRoles,
1010+
Count: 1,
1011+
},
1012+
})
10031013
}))
10041014
s.Run("UpdateMemberRoles", s.Subtest(func(db database.Store, check *expects) {
10051015
o := dbgen.Organization(s.T(), db, database.Organization{})

0 commit comments

Comments
 (0)