@@ -17,7 +17,18 @@ describe('LockerDomeAdapter', function () {
17
17
transactionId : 'b55e97d7-792c-46be-95a5-3df40b115734' ,
18
18
bidId : '2652ca954bce9' ,
19
19
bidderRequestId : '14a54fade69854' ,
20
- auctionId : 'd4c83108-615d-4c2c-9384-dac9ffd4fd72'
20
+ auctionId : 'd4c83108-615d-4c2c-9384-dac9ffd4fd72' ,
21
+ schain : {
22
+ ver : '1.0' ,
23
+ complete : 1 ,
24
+ nodes : [
25
+ {
26
+ asi : 'indirectseller.com' ,
27
+ sid : '00001' ,
28
+ hp : 1
29
+ }
30
+ ]
31
+ }
21
32
} , {
22
33
bidder : 'lockerdome' ,
23
34
params : {
@@ -32,7 +43,18 @@ describe('LockerDomeAdapter', function () {
32
43
transactionId : '73459f05-c482-4706-b2b7-72e6f6264ce6' ,
33
44
bidId : '4510f2834773ce' ,
34
45
bidderRequestId : '14a54fade69854' ,
35
- auctionId : 'd4c83108-615d-4c2c-9384-dac9ffd4fd72'
46
+ auctionId : 'd4c83108-615d-4c2c-9384-dac9ffd4fd72' ,
47
+ schain : {
48
+ ver : '1.0' ,
49
+ complete : 1 ,
50
+ nodes : [
51
+ {
52
+ asi : 'indirectseller.com' ,
53
+ sid : '00001' ,
54
+ hp : 1
55
+ }
56
+ ]
57
+ }
36
58
} ] ;
37
59
38
60
describe ( 'isBidRequestValid' , function ( ) {
@@ -103,6 +125,31 @@ describe('LockerDomeAdapter', function () {
103
125
} ) ;
104
126
} ) ;
105
127
128
+ it ( 'should add schain to request if available' , function ( ) {
129
+ const bidderRequest = {
130
+ refererInfo : {
131
+ canonicalUrl : 'https://example.com/canonical' ,
132
+ referer : 'https://example.com'
133
+ }
134
+ } ;
135
+ const schainExpected = {
136
+ ver : '1.0' ,
137
+ complete : 1 ,
138
+ nodes : [
139
+ {
140
+ asi : 'indirectseller.com' ,
141
+ sid : '00001' ,
142
+ hp : 1
143
+ }
144
+ ]
145
+ } ;
146
+
147
+ const request = spec . buildRequests ( bidRequests , bidderRequest ) ;
148
+ const requestData = JSON . parse ( request . data ) ;
149
+ expect ( requestData . schain ) . to . be . an ( 'object' ) ;
150
+ expect ( requestData . schain ) . to . deep . equal ( schainExpected ) ;
151
+ } ) ;
152
+
106
153
describe ( 'interpretResponse' , function ( ) {
107
154
it ( 'should return an empty array if an invalid response is passed' , function ( ) {
108
155
const interpretedResponse = spec . interpretResponse ( { body : { } } ) ;
0 commit comments