ui.Inputs = []string{} runCommand("-f", "a label", "a provider") Expect(ui.Prompts).To(BeEmpty()) Expect(ui.Outputs).To(ContainSubstrings( []string{"Deleting"}, []string{"OK"}, )) Expect(authTokenRepo.DeletedServiceAuthTokenFields.Guid).To(Equal("the-guid")) }) }) Context("when the service auth token does not exist", func() { BeforeEach(func() { authTokenRepo.FindByLabelAndProviderApiResponse = errors.NewModelNotFoundError("Service Auth Token", "") }) It("warns the user when the specified service auth token does not exist", func() { runCommand("a label", "a provider") Expect(ui.Outputs).To(ContainSubstrings( []string{"Deleting service auth token as", "my-user"}, []string{"OK"}, )) Expect(ui.WarnOutputs).To(ContainSubstrings([]string{"does not exist"})) }) }) Context("when there is an error deleting the service auth token", func() {