Skip to content

Commit

Permalink
fix: klaviyo bulk upload and BingAds OC (#5305)
Browse files Browse the repository at this point in the history
* fix: bing ads audience (#5299)

* chore: handle 500kb limit, refactor to service impl (#5302)

* chore: handle 500kb limit, refactor to service impl

* chore: fix mock

* chore: fix mock newline

* chore: fix apiservice newline

* chore: move error

---------

Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com>
  • Loading branch information
yashasvibajpai and ItsSudip authored Nov 19, 2024
1 parent 94aa254 commit 9c9ef73
Show file tree
Hide file tree
Showing 8 changed files with 638 additions and 478 deletions.
196 changes: 38 additions & 158 deletions mocks/router/klaviyobulkupload/klaviyobulkupload_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -539,14 +539,14 @@ var _ = Describe("Bing ads Offline Conversions", func() {
Expect(err).To(BeNil())
})

It("Transform() Test -> conversionAdjustedTime not available", func() {
It("Transform() Test -> adjustedConversionTime not available", func() {
job := &jobsdb.JobT{
EventPayload: []byte("{\"type\": \"record\", \"action\": \"update\", \"fields\": {\"conversionName\": \"Test-Integration\", \"conversionTime\": \"5/22/2023 6:27:54 AM\", \"conversionValue\": \"100\", \"microsoftClickId\": \"click_id\", \"conversionCurrencyCode\": \"USD\"}}"),
}
uploader := &BingAdsBulkUploader{}
// Execute
_, err := uploader.Transform(job)
expectedResult := fmt.Errorf(" conversionAdjustedTime field not defined")
expectedResult := fmt.Errorf(" adjustedConversionTime field not defined")
Expect(err.Error()).To(Equal(expectedResult.Error()))
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (b *BingAdsBulkUploader) Transform(job *jobsdb.JobT) (string, error) {
}
if event.Action != "insert" {
// validate for adjusted time
err := validateField(fields, "conversionAdjustedTime")
err := validateField(fields, "adjustedConversionTime")
if err != nil {
return payload, err
}
Expand Down
Loading

0 comments on commit 9c9ef73

Please sign in to comment.