BeforeEach(func() { actualLRPGroups = &models.ActualLRPGroups{ []*models.ActualLRPGroup{ {Instance: &actualLRP1}, {Instance: &actualLRP2, Evacuating: &evacuatingLRP2}, }, } fakeActualLRPDB.ActualLRPGroupsByProcessGuidReturns(actualLRPGroups, nil) }) It("responds with 200 Status OK", func() { Expect(responseRecorder.Code).To(Equal(http.StatusOK)) }) It("fetches actual lrp groups by process guid", func() { Expect(fakeActualLRPDB.ActualLRPGroupsByProcessGuidCallCount()).To(Equal(1)) _, actualProcessGuid := fakeActualLRPDB.ActualLRPGroupsByProcessGuidArgsForCall(0) Expect(actualProcessGuid).To(Equal(processGuid)) Expect(responseRecorder.Code).To(Equal(http.StatusOK)) }) It("returns a list of actual lrp groups", func() { response := &models.ActualLRPGroups{} err := response.Unmarshal(responseRecorder.Body.Bytes()) Expect(err).NotTo(HaveOccurred()) Expect(response).To(Equal(actualLRPGroups)) }) }) Context("when the DB returns no actual lrp groups", func() {