} } ] }`)) }) CCServer = httptest.NewServer(AuditorsEndpoint) cloudController = cf.NewCloudController(CCServer.URL, false) }) AfterEach(func() { CCServer.Close() }) It("returns a list of auditors for the given organization guid", func() { users, err := cloudController.GetAuditorsByOrgGuid(testOrganizationGuid, testUAAToken) if err != nil { panic(err) } Expect(len(users)).To(Equal(1)) Expect(users).To(ContainElement(cf.CloudControllerUser{ GUID: "user-123", })) }) It("returns an error when the Cloud Controller returns an error status code", func() { _, err := cloudController.GetAuditorsByOrgGuid(testOrganizationGuid, "bad-token") Expect(err).To(BeAssignableToTypeOf(cf.Failure{}))