Skip to content

Commit

Permalink
fix test spec
Browse files Browse the repository at this point in the history
  • Loading branch information
banakemi committed Oct 25, 2018
1 parent ab93aaa commit 9a77457
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions modules/adgenerationBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ export const spec = {
data = utils.tryAppendQueryString(data, 'pbver', '$prebid.version$');
data = utils.tryAppendQueryString(data, 'sdkname', 'prebidjs');
data = utils.tryAppendQueryString(data, 'adapterver', ADGENE_PREBID_VERSION);
data = utils.tryAppendQueryString(data, 'tp', utils.getTopWindowUrl());

// native以外にvideo等の対応が入った場合は要修正
if (!validReq.mediaTypes || !validReq.mediaTypes.native) {
data = utils.tryAppendQueryString(data, 'imark', '1');
}

data = utils.tryAppendQueryString(data, 'tp', utils.getTopWindowUrl());
// remove the trailing "&"
if (data.lastIndexOf('&') === data.length - 1) {
data = data.substring(0, data.length - 1);
Expand Down
5 changes: 2 additions & 3 deletions test/spec/modules/adgenerationBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ describe('AdgenerationAdapter', function () {
}
];
const data = {
banner: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=JPY&pbver=%24prebid.version%24&sdkname=prebidjs&adapterver=1.0.1&tp=http%3A%2F%2Flocalhost%3A9876%2F&imark=1`,
native: 'posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=1x1&currency=JPY&pbver=%24prebid.version%24&sdkname=prebidjs&adapterver=1.0.1&tp=http%3A%2F%2Flocalhost%3A9876%2F'
banner: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=JPY&pbver=%24prebid.version%24&sdkname=prebidjs&adapterver=1.0.1&imark=1&tp=` + encodeURIComponent(utils.getTopWindowUrl()),
native: 'posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=1x1&currency=JPY&pbver=%24prebid.version%24&sdkname=prebidjs&adapterver=1.0.1&tp=' + encodeURIComponent(utils.getTopWindowUrl())
};
it('sends bid request to ENDPOINT via GET', function () {
const request = spec.buildRequests(bidRequests)[0];
Expand All @@ -113,7 +113,6 @@ describe('AdgenerationAdapter', function () {
expect(request.data).to.equal(data.native);
});
});

describe('interpretResponse', function () {
const bidRequests = {
banner: {
Expand Down

0 comments on commit 9a77457

Please sign in to comment.