Skip to content

Commit

Permalink
Merge branch 'master' into video-placement
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanslade committed Mar 9, 2017
2 parents f300c28 + 359a162 commit 09c9c6c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
22 changes: 11 additions & 11 deletions audio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ var _ = Describe("Audio", func() {
MaxDuration: 30,
Protocols: []int{AudioProtocolDAAST1, AudioProtocolDAAST1Wrapper},
Sequence: 1,
BAttr: []int{13, 14},
BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert},
MaxExtended: 30,
MinBitrate: 300,
MaxBitrate: 1500,
Delivery: []int{2},
Delivery: []int{ContentDeliveryProgressive},
CompanionAd: []Banner{
{W: 300, H: 250, ID: "1234567893-1", Pos: 1, BAttr: []int{13, 14}, ExpDir: []int{ExpDirRight, ExpDirDown}},
{W: 728, H: 90, ID: "1234567893-2", Pos: 1, BAttr: []int{13, 14}},
{W: 300, H: 250, ID: "1234567893-1", Pos: AdPosAboveFold, BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert}, ExpDir: []int{ExpDirRight, ExpDirDown}},
{W: 728, H: 90, ID: "1234567893-2", Pos: AdPosAboveFold, BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert}},
},
API: []int{1, 2},
CompanionType: []int{1, 2},
API: []int{APIFrameworkVPAID1, APIFrameworkVPAID2},
CompanionType: []int{VASTCompanionStatic, VASTCompanionHTML},
}))
})

Expand All @@ -42,16 +42,16 @@ var _ = Describe("Audio", func() {
MaxDuration: 30,
Protocols: []int{AudioProtocolDAAST1, AudioProtocolDAAST1Wrapper},
Sequence: 1,
BAttr: []int{13, 14},
BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert},
MaxExtended: 30,
MinBitrate: 300,
MaxBitrate: 1500,
Delivery: []int{2},
Delivery: []int{ContentDeliveryProgressive},
CompanionAd: []Banner{
{W: 300, H: 250, ID: "1234567893-1", Pos: 1, BAttr: []int{13, 14}, ExpDir: []int{ExpDirRight, ExpDirDown}},
{W: 728, H: 90, ID: "1234567893-2", Pos: 1, BAttr: []int{13, 14}},
{W: 300, H: 250, ID: "1234567893-1", Pos: AdPosAboveFold, BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert}, ExpDir: []int{ExpDirRight, ExpDirDown}},
{W: 728, H: 90, ID: "1234567893-2", Pos: AdPosAboveFold, BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert}},
},
CompanionType: []int{1, 2},
CompanionType: []int{VASTCompanionStatic, VASTCompanionHTML},
}).Validate()).To(Equal(ErrInvalidAudioNoMimes))
})

Expand Down
2 changes: 1 addition & 1 deletion bidrequest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var _ = Describe("BidRequest", func() {
{
ID: "1",
Secure: json.Number("1"),
Banner: &Banner{W: 300, H: 250, Pos: AdPosAboveFold, BAttr: []int{13}},
Banner: &Banner{W: 300, H: 250, Pos: AdPosAboveFold, BAttr: []int{CreativeAttributeUserInitiated}},
},
},
Site: &Site{
Expand Down
4 changes: 2 additions & 2 deletions device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ var _ = Describe("Device", func() {
OS: "iOS",
OSVer: "6.1",
JS: 1,
ConnType: 3,
DeviceType: 1,
ConnType: ConnTypeCell,
DeviceType: DeviceTypeMobile,
}))
})
})
3 changes: 2 additions & 1 deletion native/request/request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io/ioutil"
"testing"

"github.com/bsm/openrtb"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
Expand All @@ -24,7 +25,7 @@ var _ = Describe("Request", func() {
{ID: 128, Image: &Image{TypeID: ImageTypeMain, WidthMin: 836, HeightMin: 627, Width: 1000, Height: 800, Mimes: []string{"image/jpg"}}},
{ID: 126, Required: 1, Data: &Data{TypeID: DataTypeSponsored, Length: 25}},
{ID: 127, Required: 1, Data: &Data{TypeID: DataTypeDesc, Length: 140}},
{ID: 4, Video: &Video{MinDuration: 15, MaxDuration: 30, Protocols: []int{2, 3}, Mimes: []string{"video/mp4"}}},
{ID: 4, Video: &Video{MinDuration: 15, MaxDuration: 30, Protocols: []int{openrtb.VideoProtoVAST2, openrtb.VideoProtoVAST3}, Mimes: []string{"video/mp4"}}},
},
}))
})
Expand Down
12 changes: 6 additions & 6 deletions video_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ var _ = Describe("Video", func() {
H: 480,
Linearity: VideoLinearityLinear,
Sequence: 1,
BAttr: []int{13, 14},
BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert},
MaxExtended: 30,
MinBitrate: 300,
MaxBitrate: 1500,
BoxingAllowed: iptr(1),
PlaybackMethod: []int{VideoPlaybackAutoSoundOn, VideoPlaybackClickToPlay},
Delivery: []int{2},
Delivery: []int{ContentDeliveryProgressive},
Pos: AdPosAboveFold,
CompanionAd: []Banner{
{W: 300, H: 250, ID: "1234567893-1", Pos: 1, BAttr: []int{13, 14}, ExpDir: []int{ExpDirRight, ExpDirDown}},
{W: 728, H: 90, ID: "1234567893-2", Pos: 1, BAttr: []int{13, 14}},
{W: 300, H: 250, ID: "1234567893-1", Pos: AdPosAboveFold, BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert}, ExpDir: []int{ExpDirRight, ExpDirDown}},
{W: 728, H: 90, ID: "1234567893-2", Pos: AdPosAboveFold, BAttr: []int{CreativeAttributeUserInitiated, CreativeAttributeWindowsDialogOrAlert}},
},
Api: []int{1, 2},
CompanionType: []int{1, 2},
Placement: 1,
Api: []int{APIFrameworkVPAID1, APIFrameworkVPAID2},
CompanionType: []int{VASTCompanionStatic, VASTCompanionHTML},
}))
})

Expand Down

0 comments on commit 09c9c6c

Please sign in to comment.