serviceInstance.Name = "service-instance" serviceInstance.Params = map[string]interface{}{} serviceInstanceRequirement.GetServiceInstanceReturns(serviceInstance) }) It("tells the user it is updating the user provided service", func() { cmd.Execute(flagContext) Expect(ui.Outputs).To(ContainSubstrings( []string{"Updating user provided service service-instance in org"}, )) }) It("tries to update the service instance", func() { cmd.Execute(flagContext) Expect(serviceInstanceRepo.UpdateCallCount()).To(Equal(1)) Expect(serviceInstanceRepo.UpdateArgsForCall(0)).To(Equal(serviceInstance.ServiceInstanceFields)) }) It("tells the user no changes were made", func() { cmd.Execute(flagContext) Expect(ui.Outputs).To(ContainSubstrings( []string{"No flags specified. No changes were made."}, )) }) Context("when the -p flag is passed with inline JSON", func() { BeforeEach(func() { flagContext.Parse("service-instance", "-p", `"{"some":"json"}"`) }) It("tries to update the user provided service instance with the credentials", func() {