Skip to content

Commit 0fa2141

Browse files
authored
optable-targeting: fix NoBids test to use a bid-less response
The test named for the NOBID branch stubbed a bid response that has a bid, so with non-empty targeting the validator returned SUCCESS and the test exercised the full enrichment chain instead of the signature-only one.
1 parent bb3deb3 commit 0fa2141

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

extra/modules/optable-targeting/src/test/java/org/prebid/server/hooks/modules/optable/targeting/v1/OptableTargetingAuctionResponseHookTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,15 +359,16 @@ public void shouldReturnUpdateActionWithId5SignatureWhenTargetingCallFailsAndNoB
359359
Future.failedFuture(new RuntimeException("error")));
360360
moduleContext.setId5Signature(signature);
361361
when(invocationContext.moduleContext()).thenReturn(moduleContext);
362-
when(auctionResponsePayload.bidResponse()).thenReturn(givenBidResponse());
362+
final BidResponse bidlessResponse = BidResponse.builder().build();
363+
when(auctionResponsePayload.bidResponse()).thenReturn(bidlessResponse);
363364

364365
// when
365366
final Future<InvocationResult<AuctionResponsePayload>> future =
366367
target.call(auctionResponsePayload, invocationContext);
367368
final InvocationResult<AuctionResponsePayload> result = future.result();
368369
final BidResponse bidResponse = result
369370
.payloadUpdate()
370-
.apply(AuctionResponsePayloadImpl.of(givenBidResponse()))
371+
.apply(AuctionResponsePayloadImpl.of(bidlessResponse))
371372
.bidResponse();
372373
final JsonNode passthrough = bidResponse.getExt().getPrebid().getPassthrough();
373374

0 commit comments

Comments
 (0)