Chore: Update tests to use team membership hooks (#86846)

* update tests to use team membership hooks

* linting
This commit is contained in:
Ieva
2024-04-24 16:55:42 +01:00
committed by GitHub
parent 9e54c450d7
commit 8028d1c3e1
4 changed files with 132 additions and 86 deletions
@@ -705,14 +705,12 @@ func TestIntegrationMergeUser(t *testing.T) {
return user.ErrUserNotFound
}
require.NoError(t, err)
return nil
// this is the user we want to update to another team
return teamimpl.AddOrUpdateTeamMemberHook(sess, 1, testOrgID, team1.ID, false, 0)
})
if err != nil {
t.Error(err)
}
// this is the user we want to update to another team
err = teamSvc.AddTeamMember(context.Background(), 1, testOrgID, team1.ID, false, 0)
require.NoError(t, err)
// get users
conflictUsers, err := GetUsersWithConflictingEmailsOrLogins(&cli.Context{Context: context.Background()}, sqlStore)