diff --git a/video.go b/video.go index 87e2fca..90f6510 100644 --- a/video.go +++ b/video.go @@ -7,11 +7,9 @@ import ( // Validation errors var ( - ErrInvalidVideoNoMIMEs = errors.New("openrtb: video has no mimes") - ErrInvalidVideoNoLinearity = errors.New("openrtb: video linearity missing") - ErrInvalidVideoNoMinDuration = errors.New("openrtb: video min-duration missing") - ErrInvalidVideoNoMaxDuration = errors.New("openrtb: video max-duration missing") - ErrInvalidVideoNoProtocols = errors.New("openrtb: video protocols missing") + ErrInvalidVideoNoMIMEs = errors.New("openrtb: video has no mimes") + ErrInvalidVideoNoLinearity = errors.New("openrtb: video linearity missing") + ErrInvalidVideoNoProtocols = errors.New("openrtb: video protocols missing") ) // Video object must be included directly in the impression object if the impression offered @@ -53,10 +51,6 @@ func (v *Video) Validate() error { return ErrInvalidVideoNoMIMEs } else if v.Linearity == 0 { return ErrInvalidVideoNoLinearity - } else if v.MinDuration == 0 { - return ErrInvalidVideoNoMinDuration - } else if v.MaxDuration == 0 { - return ErrInvalidVideoNoMaxDuration } else if v.Protocol == 0 && len(v.Protocols) == 0 { return ErrInvalidVideoNoProtocols } diff --git a/video_test.go b/video_test.go index 196d367..ffad210 100644 --- a/video_test.go +++ b/video_test.go @@ -51,15 +51,6 @@ var _ = Describe("Video", func() { Expect((&Video{ MIMEs: []string{"video/mp4"}, }).Validate()).To(Equal(ErrInvalidVideoNoLinearity)) - Expect((&Video{ - Linearity: VideoLinearityNonLinear, - MIMEs: []string{"video/mp4"}, - }).Validate()).To(Equal(ErrInvalidVideoNoMinDuration)) - Expect((&Video{ - MinDuration: 1, - Linearity: VideoLinearityNonLinear, - MIMEs: []string{"video/mp4"}, - }).Validate()).To(Equal(ErrInvalidVideoNoMaxDuration)) Expect((&Video{ MinDuration: 1, MaxDuration: 1,