runCommand("-f", "service-broker-to-delete") Expect(brokerRepo.FindByNameName).To(Equal("service-broker-to-delete")) Expect(brokerRepo.DeletedServiceBrokerGuid).To(Equal("service-broker-to-delete-guid")) Expect(ui.Prompts).To(BeEmpty()) testassert.SliceContains(ui.Outputs, testassert.Lines{ {"Deleting service broker", "service-broker-to-delete", "my-user"}, {"OK"}, }) }) }) Context("when the service broker does not exist", func() { BeforeEach(func() { brokerRepo.FindByNameNotFound = true }) It("warns the user", func() { ui.Inputs = []string{} runCommand("-f", "service-broker-to-delete") Expect(brokerRepo.FindByNameName).To(Equal("service-broker-to-delete")) Expect(brokerRepo.DeletedServiceBrokerGuid).To(Equal("")) testassert.SliceContains(ui.Outputs, testassert.Lines{ {"Deleting service broker", "service-broker-to-delete"}, {"OK"}, }) testassert.SliceContains(ui.WarnOutputs, testassert.Lines{ {"service-broker-to-delete", "does not exist"},