Chore: Remove x from team (#47905)

* Chore: Remove x from team

* Update pkg/services/sqlstore/team.go

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>

* Update pkg/services/sqlstore/team.go

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>

* Refactor dialects and add ISAdminOfTeams to Store

* Add IsAdminOfTeams to mockstore

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
This commit is contained in:
Kat Yang
2022-04-20 15:11:37 -04:00
committed by GitHub
co-authored by ying-jeanne
parent 72b5af8d9b
commit 68478e908a
5 changed files with 161 additions and 148 deletions
+2 -2
View File
@@ -302,12 +302,12 @@ func TestTeamCommandsAndQueries(t *testing.T) {
require.NoError(t, err)
query := &models.IsAdminOfTeamsQuery{SignedInUser: &models.SignedInUser{OrgId: testOrgID, UserId: userIds[0]}}
err = IsAdminOfTeams(context.Background(), query)
err = sqlStore.IsAdminOfTeams(context.Background(), query)
require.NoError(t, err)
require.False(t, query.Result)
query = &models.IsAdminOfTeamsQuery{SignedInUser: &models.SignedInUser{OrgId: testOrgID, UserId: userIds[1]}}
err = IsAdminOfTeams(context.Background(), query)
err = sqlStore.IsAdminOfTeams(context.Background(), query)
require.NoError(t, err)
require.True(t, query.Result)
})