Skip to content

Commit 950672f

Browse files
committed
InvibesBidder: fix parameter parsing issue (#3956)
1 parent 07fc6cc commit 950672f

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

src/main/java/org/prebid/server/bidder/invibes/InvibesBidder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ private static String resolveWidth(Device device) {
247247
}
248248

249249
private static String resolveHost(Integer domainId) {
250-
if (domainId == 0 || domainId == 1 || domainId == 1001) {
250+
if (domainId == null || domainId == 0 || domainId == 1 || domainId == 1001) {
251251
return "bid";
252252
} else if (domainId < 1002) {
253253
return "bid" + domainId;

src/test/java/org/prebid/server/bidder/invibes/InvibesBidderTest.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,23 @@ public void makeHttpRequestsShouldCreateCorrectURLFor1003Zone() {
8585
assertThat(result.getValue().getFirst().getUri()).isEqualTo("https://bid3.videostep.com/bid/");
8686
}
8787

88+
@Test
89+
public void makeHttpRequestsShouldCreateCorrectURLForNullZone() {
90+
// given
91+
final BidRequest bidRequest = givenBidRequest(
92+
identity(),
93+
impBuilder -> impBuilder.banner(Banner.builder().h(BANNER_H).w(BANNER_W).build()),
94+
ExtImpInvibes.of("12", null, InvibesDebug.of("test", true)));
95+
96+
// when
97+
final Result<List<HttpRequest<InvibesBidRequest>>> result = target.makeHttpRequests(bidRequest);
98+
99+
// then
100+
assertThat(result.getErrors()).isEmpty();
101+
assertThat(result.getValue()).hasSize(1);
102+
assertThat(result.getValue().getFirst().getUri()).isEqualTo("https://bid.videostep.com/bid/");
103+
}
104+
88105
@Test
89106
public void makeHttpRequestsShouldCreateCorrectURLFor0Zone() {
90107
// given

0 commit comments

Comments
 (0)