From 30f766599e95cafe69c9ff391320ddc4af507831 Mon Sep 17 00:00:00 2001 From: Samuel Horwitz Date: Fri, 22 Jun 2018 15:18:41 -0400 Subject: [PATCH] add request timestamp and fix casing (#2664) --- modules/kargoBidAdapter.js | 3 ++- test/spec/modules/kargoBidAdapter_spec.js | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/kargoBidAdapter.js b/modules/kargoBidAdapter.js index 154e4a7b3b7..dfcc3057ab7 100644 --- a/modules/kargoBidAdapter.js +++ b/modules/kargoBidAdapter.js @@ -17,11 +17,12 @@ export const spec = { timeout: bidderRequest.timeout, currency: currency, cpmGranularity: 1, + timestamp: (new Date()).getTime(), cpmRange: { floor: 0, ceil: 20 }, - adSlotIds: utils._map(validBidRequests, bid => bid.params.placementId) + adSlotIDs: utils._map(validBidRequests, bid => bid.params.placementId) }, spec._getAllMetadata()); const encodedParams = encodeURIComponent(JSON.stringify(transformedParams)); return Object.assign({}, bidderRequest, { diff --git a/test/spec/modules/kargoBidAdapter_spec.js b/test/spec/modules/kargoBidAdapter_spec.js index 0e896b4fc04..bb0feeba069 100644 --- a/test/spec/modules/kargoBidAdapter_spec.js +++ b/test/spec/modules/kargoBidAdapter_spec.js @@ -4,14 +4,16 @@ import {registerBidder} from 'src/adapters/bidderFactory'; import {config} from 'src/config'; describe('kargo adapter tests', function () { - var sandbox; + var sandbox, clock, frozenNow = new Date(); beforeEach(() => { sandbox = sinon.sandbox.create(); + clock = sinon.useFakeTimers(frozenNow.getTime()); }); afterEach(() => { sandbox.restore(); + clock.restore(); }); describe('bid request validity', function() { @@ -166,11 +168,12 @@ describe('kargo adapter tests', function () { timeout: 200, currency: 'USD', cpmGranularity: 1, + timestamp: frozenNow.getTime(), cpmRange: { floor: 0, ceil: 20 }, - adSlotIds: [ + adSlotIDs: [ 'foo', 'bar' ],