コード例 #1
0
						return ui.Outputs()
					}).NotTo(ContainSubstrings(
						[]string{"Unbind cancelled"},
					))
				})

				It("tells the user it is unbinding the route service", func() {
					Expect(runCLIErr).NotTo(HaveOccurred())
					Expect(ui.Outputs()).To(ContainSubstrings(
						[]string{"Unbinding route", "from service instance"},
					))
				})

				It("tries to unbind the route service", func() {
					Expect(runCLIErr).NotTo(HaveOccurred())
					Expect(routeServiceBindingRepo.UnbindCallCount()).To(Equal(1))
				})

				Context("when unbinding the route service succeeds", func() {
					BeforeEach(func() {
						routeServiceBindingRepo.UnbindReturns(nil)
					})

					It("says OK", func() {
						Expect(runCLIErr).NotTo(HaveOccurred())
						Expect(ui.Outputs()).To(ContainSubstrings(
							[]string{"OK"},
						))
					})
				})