File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,35 @@ describe('IndexexchangeAdapter', function () {
110
110
]
111
111
} ;
112
112
113
+ const DEFAULT_BANNER_BID_RESPONSE_WITHOUT_ADOMAIN = {
114
+ cur : 'USD' ,
115
+ id : '11a22b33c44d' ,
116
+ seatbid : [
117
+ {
118
+ bid : [
119
+ {
120
+ crid : '12345' ,
121
+ adid : '14851455' ,
122
+ impid : '1a2b3c4d' ,
123
+ cid : '3051266' ,
124
+ price : 100 ,
125
+ w : 300 ,
126
+ h : 250 ,
127
+ id : '1' ,
128
+ ext : {
129
+ dspid : 50 ,
130
+ pricelevel : '_100' ,
131
+ advbrandid : 303325 ,
132
+ advbrand : 'OECTA'
133
+ } ,
134
+ adm : '<a target="_blank" href="https://www.indexexchange.com"></a>'
135
+ }
136
+ ] ,
137
+ seat : '3970'
138
+ }
139
+ ]
140
+ } ;
141
+
113
142
const DEFAULT_VIDEO_BID_RESPONSE = {
114
143
cur : 'USD' ,
115
144
id : '1aa2bb3cc4de' ,
@@ -844,6 +873,31 @@ describe('IndexexchangeAdapter', function () {
844
873
expect ( result [ 0 ] ) . to . deep . equal ( expectedParse [ 0 ] ) ;
845
874
} ) ;
846
875
876
+ it ( 'should get correct bid response for banner ad with missing adomain' , function ( ) {
877
+ const expectedParse = [
878
+ {
879
+ requestId : '1a2b3c4d' ,
880
+ cpm : 1 ,
881
+ creativeId : '12345' ,
882
+ width : 300 ,
883
+ height : 250 ,
884
+ mediaType : 'banner' ,
885
+ ad : '<a target="_blank" href="https://www.indexexchange.com"></a>' ,
886
+ currency : 'USD' ,
887
+ ttl : 300 ,
888
+ netRevenue : true ,
889
+ dealId : undefined ,
890
+ meta : {
891
+ networkId : 50 ,
892
+ brandId : 303325 ,
893
+ brandName : 'OECTA'
894
+ }
895
+ }
896
+ ] ;
897
+ const result = spec . interpretResponse ( { body : DEFAULT_BANNER_BID_RESPONSE_WITHOUT_ADOMAIN } , { data : DEFAULT_BIDDER_REQUEST_DATA } ) ;
898
+ expect ( result [ 0 ] ) . to . deep . equal ( expectedParse [ 0 ] ) ;
899
+ } ) ;
900
+
847
901
it ( 'should set creativeId to default value if not provided' , function ( ) {
848
902
const bidResponse = utils . deepClone ( DEFAULT_BANNER_BID_RESPONSE ) ;
849
903
delete bidResponse . seatbid [ 0 ] . bid [ 0 ] . crid ;
You can’t perform that action at this time.
0 commit comments