serviceInstance.ServicePlan = models.ServicePlanFields{ GUID: "service-plan-guid", } serviceInstanceRequirement.GetServiceInstanceReturns(serviceInstance) }) It("does not warn", func() { Expect(runCLIErr).NotTo(HaveOccurred()) Expect(ui.Outputs()).NotTo(ContainSubstrings( []string{"Bind cancelled"}, )) }) It("tries to bind the route service", func() { Expect(runCLIErr).NotTo(HaveOccurred()) Expect(routeServiceBindingRepo.BindCallCount()).To(Equal(1)) }) Context("when binding the route service succeeds", func() { BeforeEach(func() { routeServiceBindingRepo.BindReturns(nil) }) It("says OK", func() { Expect(runCLIErr).NotTo(HaveOccurred()) Expect(ui.Outputs()).To(ContainSubstrings( []string{"OK"}, )) }) })