Exemplo n.º 1
0
				Expect(ui.Outputs).To(ContainSubstrings(
					[]string{"Error fetching plans"},
					[]string{"FAILED"},
				))
			})
		})
		Context("when the plan specified does not exist in the service offering", func() {
			It("returns an error", func() {
				callUpdateService([]string{"-p", "not-a-real-plan", "instance-without-service-offering"})

				Expect(ui.Outputs).To(ContainSubstrings(
					[]string{"Plan does not exist for the murkydb service"},
					[]string{"FAILED"},
				))
			})
		})
		Context("when there is an error updating the service instance", func() {
			It("returns an error", func() {
				serviceRepo.UpdateServiceInstanceReturnsErr = true
				callUpdateService([]string{"-p", "flare", "my-service-instance"})

				Expect(ui.Outputs).To(ContainSubstrings(
					[]string{"Error updating service instance"},
					[]string{"FAILED"},
				))
			})
		})
	})
})