Ejemplo n.º 1
0
			})

			It("skips confirmation when the -f flag is given", func() {
				runCommand("-f", "foo.com")

				Expect(ui.Prompts).To(BeEmpty())
				testassert.SliceContains(ui.Outputs, testassert.Lines{
					{"Deleting service", "foo.com"},
					{"OK"},
				})
			})
		})

		Context("when the service does not exist", func() {
			BeforeEach(func() {
				serviceRepo.FindInstanceByNameNotFound = true
			})

			It("warns the user the service does not exist", func() {
				runCommand("-f", "my-service")

				testassert.SliceContains(ui.Outputs, testassert.Lines{
					{"Deleting service", "my-service"},
					{"OK"},
				})

				testassert.SliceContains(ui.WarnOutputs, testassert.Lines{
					{"my-service", "does not exist"},
				})
			})
		})