Beispiel #1
0
							EndTime:      time.Unix(100, 0),
						},
						&db.Build{
							ID:           3,
							Name:         "2",
							JobName:      "some-job",
							PipelineName: "some-pipeline",
							Status:       db.StatusStarted,
						},
						nil,
					)
				})

				Context("when getting the job fails", func() {
					BeforeEach(func() {
						pipelineDB.GetJobReturns(db.SavedJob{}, errors.New("nope"))
					})

					It("returns 500", func() {
						Expect(response.StatusCode).To(Equal(http.StatusInternalServerError))
					})
				})

				Context("when getting the job succeeds", func() {
					BeforeEach(func() {
						pipelineDB.GetJobReturns(db.SavedJob{
							ID:           1,
							Paused:       true,
							PipelineName: "some-pipeline",
							Job: db.Job{
								Name: "job-1",