Exemple #1
0
				})
			})

			Context("when the domain is blank", func() {
				BeforeEach(func() {
					request.Domain = ""
				})

				It("returns a validation error", func() {
					Expect(request.Validate()).To(ConsistOf(models.ErrInvalidField{"domain"}))
				})
			})

			Context("when the TaskDefinition is nil", func() {
				BeforeEach(func() {
					request.TaskDefinition = nil
				})

				It("returns a validation error", func() {
					Expect(request.Validate()).To(ConsistOf(models.ErrInvalidField{"task_definition"}))
				})
			})

			Context("when the TaskDefinition has an invalid field", func() {
				BeforeEach(func() {
					request.TaskDefinition.RootFs = ""
				})

				It("bubbles up the appropriate invalid field error", func() {
					Expect(request.Validate()).To(ConsistOf(models.ErrInvalidField{"rootfs"}))
				})