)) }) It("tells the user it is unbinding the route service", func() { Expect(ui.Outputs).To(ContainSubstrings( []string{"Unbinding route", "from service instance"}, )) }) It("tries to unbind the route service", func() { Expect(routeServiceBindingRepo.UnbindCallCount()).To(Equal(1)) }) Context("when unbinding the route service succeeds", func() { BeforeEach(func() { routeServiceBindingRepo.UnbindReturns(nil) }) It("says OK", func() { Expect(ui.Outputs).To(ContainSubstrings( []string{"OK"}, )) }) }) Context("when unbinding the route service fails because it was not bound", func() { BeforeEach(func() { routeServiceBindingRepo.UnbindReturns(errors.NewHttpError(http.StatusOK, errors.ROUTE_WAS_NOT_BOUND, "http-err")) }) It("says OK", func() {