BeforeEach(func() { job.Name = "" config.Jobs = append(config.Jobs, job) }) It("returns an error", func() { Ω(validateErr).Should(HaveOccurred()) Ω(validateErr.Error()).Should(ContainSubstring( "jobs[2] has no name", )) }) }) Context("when a job has no config and no config path", func() { BeforeEach(func() { job.TaskConfig = nil job.TaskConfigPath = "" config.Jobs = append(config.Jobs, job) }) It("returns no error", func() { Ω(validateErr).ShouldNot(HaveOccurred()) }) }) Context("when a job's input has no resource", func() { BeforeEach(func() { job.InputConfigs = append(job.InputConfigs, atc.JobInputConfig{ RawName: "foo", }) config.Jobs = append(config.Jobs, job)