}, 1, true, nil) }) Context("when getting the check error succeeds", func() { BeforeEach(func() { pipelineDB.GetResourceStub = func(name string) (db.SavedResource, error) { if name == "resource-2" { return db.SavedResource{ ID: 1, CheckError: errors.New("sup"), PipelineName: "a-pipeline", Resource: db.Resource{ Name: name, }, }, nil } else { return db.SavedResource{ ID: 2, Paused: true, PipelineName: "a-pipeline", Resource: db.Resource{ Name: name, }, }, nil } } }) It("returns 200 OK", func() { Expect(response.StatusCode).To(Equal(http.StatusOK)) })