Skip to content

Commit 478b6c9

Browse files
committed
Minor update after review
1 parent 861bc0d commit 478b6c9

1 file changed

Lines changed: 9 additions & 40 deletions

File tree

src/test/groovy/org/prebid/server/functional/tests/module/responsecorrenction/ResponseCorrectionSpec.groovy

Lines changed: 9 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import org.prebid.server.functional.model.config.PbResponseCorrection
88
import org.prebid.server.functional.model.config.PbsModulesConfig
99
import org.prebid.server.functional.model.config.SuppressIbv
1010
import org.prebid.server.functional.model.db.Account
11+
import org.prebid.server.functional.model.request.auction.BidRequest
1112
import org.prebid.server.functional.model.request.auction.Imp
1213
import org.prebid.server.functional.model.response.auction.Adm
1314
import org.prebid.server.functional.model.response.auction.BidExt
@@ -738,19 +739,14 @@ class ResponseCorrectionSpec extends ModuleBaseSpec {
738739
[BidderName.GENERIC, BidderName.GENERIC_CAMEL_CASE],]
739740
}
740741

741-
def "PBS should reject auction with 353 code when suppress IBV is enabled, imp media type is Banner, bid response meta media type is Video, and excluded list lacks request bidder"() {
742-
given: "Default bid request with banner and APP"
743-
def bidRequest = getDefaultBidRequest(APP).tap {
744-
ext.prebid.returnAllBidStatus = true
745-
}
746-
747-
and: "Save account with enabled response correction module and suppress ibv"
742+
def "PBS should reject auction with 353 code when suppress IBV is enabled, imp media type and bid response meta media type is different, and excluded list lacks request bidder"() {
743+
given: "Save account with enabled response correction module and suppress ibv"
748744
def accountWithResponseCorrectionModule = accountConfigWithResponseCorrectionModuleAndSuppressIbv(bidRequest.getAccountId(), bidderName)
749745
accountDao.save(accountWithResponseCorrectionModule)
750746

751747
and: "Set bidder response with meta media type"
752748
def bidResponse = BidResponse.getDefaultBidResponse(bidRequest).tap {
753-
seatbid[0].bid[0].ext = new BidExt(prebid: new Prebid(meta: new Meta(mediaType: VIDEO.value)))
749+
seatbid[0].bid[0].ext = new BidExt(prebid: new Prebid(meta: new Meta(mediaType: bidResponseMediaType.value)))
754750
}
755751
bidder.setResponse(bidRequest.id, bidResponse)
756752

@@ -769,38 +765,11 @@ class ResponseCorrectionSpec extends ModuleBaseSpec {
769765
assert response.seatbid.isEmpty()
770766

771767
where:
772-
bidderName << [[], [BidderName.GENER_X], [BidderName.WILDCARD], [BidderName.UNKNOWN, BidderName.BOGUS]]
773-
}
774-
775-
def "PBS should reject auction with 353 code when enabled suppress ibv and imp with media type Banner and bid response meta media type with Video"() {
776-
given: "Default bid request with banner and APP"
777-
def bidRequest = getDefaultBidRequest(APP).tap {
778-
ext.prebid.returnAllBidStatus = true
779-
}
780-
781-
and: "Save account with enabled response correction module and suppress ibv"
782-
def accountWithResponseCorrectionModule = accountConfigWithResponseCorrectionModuleAndSuppressIbv(bidRequest.getAccountId())
783-
accountDao.save(accountWithResponseCorrectionModule)
784-
785-
and: "Set bidder response with meta media type"
786-
def bidResponse = BidResponse.getDefaultBidResponse(bidRequest).tap {
787-
seatbid[0].bid[0].ext = new BidExt(prebid: new Prebid(meta: new Meta(mediaType: VIDEO.value)))
788-
}
789-
bidder.setResponse(bidRequest.id, bidResponse)
790-
791-
when: "PBS processes auction request"
792-
def response = pbsServiceWithResponseCorrectionModule.sendAuctionRequest(bidRequest)
793-
794-
then: "PBS response should contain seatNonBid for called bidder"
795-
assert response.ext.seatnonbid.size() == 1
796-
797-
def seatNonBid = response.ext.seatnonbid[0]
798-
assert seatNonBid.seat == BidderName.GENERIC
799-
assert seatNonBid.nonBid[0].impId == bidRequest.imp[0].id
800-
assert seatNonBid.nonBid[0].statusCode == RESPONSE_REJECTED_DUE_TO_IN_BANNER_VIDEO
801-
802-
and: "Seat bid should be empty"
803-
assert response.seatbid.isEmpty()
768+
bidderName | bidResponseMediaType | bidRequest
769+
[] | VIDEO | BidRequest.defaultBidRequest.tap {ext.prebid.returnAllBidStatus = true }
770+
[BidderName.GENER_X] | BANNER | BidRequest.defaultAudioRequest.tap {ext.prebid.returnAllBidStatus = true }
771+
[BidderName.WILDCARD] | AUDIO | BidRequest.defaultNativeRequest.tap {ext.prebid.returnAllBidStatus = true }
772+
[BidderName.UNKNOWN, BidderName.BOGUS] | NATIVE | BidRequest.defaultVideoRequest.tap {ext.prebid.returnAllBidStatus = true }
804773
}
805774

806775
def "PBS should reject auction with 353 code when enabled suppress ibv and multi-imp with different media type and bid response meta media type with Video"() {

0 commit comments

Comments
 (0)