serviceRepo.FindServiceOfferingByLabelAndProviderReturns(models.ServiceOffering{}, errors.New("oh no!"))

		runCommand(
			[]string{"-f", "-p", "the-provider", "the-service-name"},
		)

		Expect(ui.Outputs).To(ContainSubstrings(
			[]string{"FAILED"},
			[]string{"oh no!"},
		))

		Expect(serviceRepo.PurgeServiceOfferingCallCount()).To(BeZero())
	})

	It("fails with an error message when the purging request fails", func() {
		serviceRepo.PurgeServiceOfferingReturns(fmt.Errorf("crumpets insufficiently buttered"))

		runCommand(
			[]string{"-f", "-p", "the-provider", "the-service-name"},
		)

		Expect(ui.Outputs).To(ContainSubstrings(
			[]string{"FAILED"},
			[]string{"crumpets insufficiently buttered"},
		))
	})

	It("indicates when a service doesn't exist", func() {
		serviceRepo.FindServiceOfferingByLabelAndProviderReturns(models.ServiceOffering{}, cferrors.NewModelNotFoundError("Service Offering", ""))

		ui.Inputs = []string{"yes"}
					ui.Inputs = []string{"y"}
				})

				It("tells the user it will purge the service offering", func() {
					cmd.Execute(flagContext)
					Expect(ui.Outputs).To(ContainSubstrings([]string{"Purging service service-name..."}))
				})

				It("tries to purge the service offering", func() {
					cmd.Execute(flagContext)
					Expect(serviceRepo.PurgeServiceOfferingCallCount()).To(Equal(1))
				})

				Context("when purging succeeds", func() {
					BeforeEach(func() {
						serviceRepo.PurgeServiceOfferingReturns(nil)
					})

					It("says OK", func() {
						cmd.Execute(flagContext)
						Expect(ui.Outputs).To(ContainSubstrings([]string{"OK"}))
					})
				})

				Context("when purging fails", func() {
					BeforeEach(func() {
						serviceRepo.PurgeServiceOfferingReturns(errors.New("purge-err"))
					})

					It("fails with error", func() {
						Expect(func() { cmd.Execute(flagContext) }).To(Panic())