diff --git a/modules/adyoulikeBidAdapter.js b/modules/adyoulikeBidAdapter.js index 0c47a90f3bd..38731fdc91c 100644 --- a/modules/adyoulikeBidAdapter.js +++ b/modules/adyoulikeBidAdapter.js @@ -446,7 +446,7 @@ function getNativeAssets(response, nativeConfig) { /* Create bid from response */ function createBid(response, bidRequests) { - if (!response || (!response.Ad && !response.Native)) { + if (!response || (!response.Ad && !response.Native && !response.Vast)) { return } diff --git a/test/spec/modules/adyoulikeBidAdapter_spec.js b/test/spec/modules/adyoulikeBidAdapter_spec.js index 7e8988b6e24..befc95e5f24 100644 --- a/test/spec/modules/adyoulikeBidAdapter_spec.js +++ b/test/spec/modules/adyoulikeBidAdapter_spec.js @@ -158,6 +158,17 @@ describe('Adyoulike Adapter', function () { } }; + const sentBidVideo = { + 'bid_id_0': { + 'PlacementID': 'e622af275681965d3095808561a1e510', + 'TransactionID': 'e8355240-d976-4cd5-a493-640656fe08e8', + 'AvailableSizes': '', + 'Video': { + playerSize: [640, 480] + } + } + }; + const sentNativeImageType = { 'additional': { 'sent': [ @@ -382,6 +393,28 @@ describe('Adyoulike Adapter', function () { meta: testMetaObject }]; + const responseWithSingleVideo = [{ + 'BidID': 'bid_id_0', + 'Placement': 'placement_0', + 'Vast': 'PFZBU1Q+RW1wdHkgc2FtcGxlPC92YXN0Pg==', + 'Price': 0.5, + 'Height': 600, + }]; + + const videoResult = [{ + cpm: 0.5, + creativeId: undefined, + currency: 'USD', + netRevenue: true, + requestId: 'bid_id_0', + ttl: 3600, + mediaType: 'video', + meta: { + advertiserDomains: [] + }, + vastXml: 'Empty sample' + }]; + const responseWithMultiplePlacements = [ { 'BidID': 'bid_id_0', @@ -689,5 +722,13 @@ describe('Adyoulike Adapter', function () { expect(result).to.deep.equal(noMeta); }); + + it('receive Vast reponse with Video ad', function () { + serverResponse.body = responseWithSingleVideo; + let result = spec.interpretResponse(serverResponse, {data: '{"Bids":' + JSON.stringify(sentBidVideo) + '}'}); + + expect(result.length).to.equal(1); + expect(result).to.deep.equal(videoResult); + }); }); });