@@ -167,7 +167,8 @@ describe('triplelift adapter', function () {
167
167
mediaTypes : {
168
168
video : {
169
169
context : 'instream' ,
170
- playerSize : [ 640 , 480 ]
170
+ playerSize : [ 640 , 480 ] ,
171
+ playbackmethod : 5
171
172
}
172
173
} ,
173
174
adUnitCode : 'adunit-code-instream' ,
@@ -292,7 +293,8 @@ describe('triplelift adapter', function () {
292
293
mediaTypes : {
293
294
video : {
294
295
context : 'instream' ,
295
- playerSize : [ 640 , 480 ]
296
+ playerSize : [ 640 , 480 ] ,
297
+ playbackmethod : [ 1 , 2 , 3 ]
296
298
} ,
297
299
banner : {
298
300
sizes : [
@@ -1181,6 +1183,16 @@ describe('triplelift adapter', function () {
1181
1183
'gpp_sid' : [ 7 ]
1182
1184
} )
1183
1185
} ) ;
1186
+ it ( 'should cast playbackmethod as an array if it is an integer and it exists' , function ( ) {
1187
+ const request = tripleliftAdapterSpec . buildRequests ( bidRequests , bidderRequest ) ;
1188
+ expect ( request . data . imp [ 1 ] . video . playbackmethod ) . to . be . a ( 'array' ) ;
1189
+ expect ( request . data . imp [ 1 ] . video . playbackmethod ) . to . deep . equal ( [ 5 ] ) ;
1190
+ } ) ;
1191
+ it ( 'should set playbackmethod as an array if it exists as an array' , function ( ) {
1192
+ const request = tripleliftAdapterSpec . buildRequests ( bidRequests , bidderRequest ) ;
1193
+ expect ( request . data . imp [ 5 ] . video . playbackmethod ) . to . be . a ( 'array' ) ;
1194
+ expect ( request . data . imp [ 5 ] . video . playbackmethod ) . to . deep . equal ( [ 1 , 2 , 3 ] ) ;
1195
+ } ) ;
1184
1196
} ) ;
1185
1197
1186
1198
describe ( 'interpretResponse' , function ( ) {
0 commit comments