Skip to content

Commit

Permalink
fix test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thatmattlove committed Aug 6, 2024
1 parent 776e303 commit 9e90e08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bulk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ func TestBulkClient_InsertMultiple(t *testing.T) {
t.Cleanup(func() {
if status.State == "JobComplete" {
soql := sfdc.NewSOQL[sfdc.ObjectID](Client)
q := sfdc.SOQL().Select("Id").From("Contact").Where("FirstName", sfdc.EQUALS, t.Name())
q := sfdc.SOQL().Select("Id").From("Contact").Where("FirstName", sfdc.EQUALS, t.Name()).Where("LastName", sfdc.CONTAINS, lastName)
res, err := soql.Query(q)
require.NoError(t, err)
assert.Len(t, res.Records, len(contacts))
for _, record := range res.Records {
path := fmt.Sprintf(sfdc.PATH_CONTACT, sfdc.API_VERSION) + fmt.Sprintf("/%s", record.ID)
err := Client.DeleteObject(path)
require.NoError(t, err)
}
assert.Len(t, res.Records, len(contacts))
}
})
}
Expand Down

0 comments on commit 9e90e08

Please sign in to comment.