Skip to content

Commit

Permalink
prebid#11 Add a JSON test for absent impressionUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
nealeu committed Feb 12, 2019
1 parent de2cae5 commit 97211f9
Showing 1 changed file with 124 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"mockBidRequest": {
"id": "test-request-id",
"imp": [
{
"id": "test-no-impUrl-id",
"banner": {
"format": [{"w": 300, "h": 250}]
},
"ext": {
"bidder": {
"networkId": 11,
"siteId": 32,
"unitId": 42,
"unitName": "the-answer"
}
}
}
],
"device": {
"ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36",
"ip": "123.123.123.123"
},
"site": {
"domain": "www.some.com",
"page": "http://www.some.com/page-where-ad-will-be-shown",
"ref": "http://www.some.com/page-before-the-ad-if-any"
},
"user": {
"buyeruid": "test_reader_id"
}
},

"httpCalls": [
{
"expectedRequest": {
"headers": {
"Accept": [
"application/json"
],
"Content-Type": [
"application/json"
],
"User-Agent": [
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36"
],
"X-Forwarded-For": [
"123.123.123.123"
],
"Forwarded": [
"for=123.123.123.123"
],
"Origin": [
"http://www.some.com"
],
"Referer": [
"http://www.some.com/page-where-ad-will-be-shown"
]
},
"uri": "https://e.serverbid.com/api/v2",
"body": {
"placements": [
{
"adTypes": [5],
"divName": "test-no-impUrl-id",
"networkId": 11,
"siteId": 32,
"unitId": 42,
"unitName": "the-answer"
}
],
"time": 1451651415,
"includePricingData": true,
"user":{},
"enableBotFiltering": true,
"parallel": true,
"url": "http://www.some.com/page-where-ad-will-be-shown",
"referrer": "http://www.some.com/page-before-the-ad-if-any"
}
},
"mockResponse": {
"status": 200,
"body": {
"decisions": {
"test-no-impUrl-id": {
"adId": "adid-consumable",
"bidderName": "aol",
"pricing": {
"clearPrice": 0.5
},
"width": 300,
"height": 250,
"contents" : [
{
"body": "<blink>Remember this: https://www.google.com/search?q=blink+tag ?</blink>"
}
]
}
}
}
}
}
],

"expectedBidResponses": [
{
"currency": "USD",
"bids": [
{
"bid": {
"id": "adid-consumable",
"impid": "test-no-impUrl-id",
"price": 0.5,
"adm": "<script type=\"text/javascript\">document.write(\"<div id=\"the-answer-42\">\");</script><blink>Remember this: https://www.google.com/search?q=blink+tag ?</blink><script type=\"text/javascript\">document.write(\"</div>\");</script><script type=\"text/javascript\">document.write(\"<div class=\"the-answer\"></div>\");</script><script type=\"text/javascript\">document.write(\"<scr\"+\"ipt type=\"text/javascript\" src=\"https://yummy.consumable.com/42/the-answer/widget/unit.js?cb=1451651415\" charset=\"utf-8\" async></scr\"+\"ipt>\");</script>",
"exp": 30,
"w": 300,
"h": 250
},
"type": "banner"
}
]
}
]
}

0 comments on commit 97211f9

Please sign in to comment.