chore: implement filters for the organizations query (#14468)

Required for organization sync. Allows fetching a filtered set of orgs.
This commit is contained in:
Steven Masley
2024-08-28 13:24:28 -05:00
committed by GitHub
parent 7667d64686
commit 54fe082551
13 changed files with 67 additions and 26 deletions

View File

@ -635,7 +635,7 @@ func (s *MethodTestSuite) TestOrganization() {
def, _ := db.GetDefaultOrganization(context.Background())
a := dbgen.Organization(s.T(), db, database.Organization{})
b := dbgen.Organization(s.T(), db, database.Organization{})
check.Args().Asserts(def, policy.ActionRead, a, policy.ActionRead, b, policy.ActionRead).Returns(slice.New(def, a, b))
check.Args(database.GetOrganizationsParams{}).Asserts(def, policy.ActionRead, a, policy.ActionRead, b, policy.ActionRead).Returns(slice.New(def, a, b))
}))
s.Run("GetOrganizationsByUserID", s.Subtest(func(db database.Store, check *expects) {
u := dbgen.User(s.T(), db, database.User{})