Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private static String resolveWidth(Device device) {
}

private static String resolveHost(Integer domainId) {
if (domainId == 0 || domainId == 1 || domainId == 1001) {
if (domainId == null || domainId == 0 || domainId == 1 || domainId == 1001) {
return "bid";
} else if (domainId < 1002) {
return "bid" + domainId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,23 @@ public void makeHttpRequestsShouldCreateCorrectURLFor1003Zone() {
assertThat(result.getValue().getFirst().getUri()).isEqualTo("https://bid3.videostep.com/bid/");
}

@Test
public void makeHttpRequestsShouldCreateCorrectURLForNullZone() {
// given
final BidRequest bidRequest = givenBidRequest(
identity(),
impBuilder -> impBuilder.banner(Banner.builder().h(BANNER_H).w(BANNER_W).build()),
ExtImpInvibes.of("12", null, InvibesDebug.of("test", true)));

// when
final Result<List<HttpRequest<InvibesBidRequest>>> result = target.makeHttpRequests(bidRequest);

// then
assertThat(result.getErrors()).isEmpty();
assertThat(result.getValue()).hasSize(1);
assertThat(result.getValue().getFirst().getUri()).isEqualTo("https://bid.videostep.com/bid/");
}

@Test
public void makeHttpRequestsShouldCreateCorrectURLFor0Zone() {
// given
Expand Down
Loading