[]string{"Refreshing went wrong"}, []string{"FAILED"}, )) }) }) Context("when the named service exists", func() { It("returns OK when ran successfully", func() { Expect(runCommand([]string{"service"})).To(BeTrue()) Expect(ui.Outputs).To(ContainSubstrings( []string{"OK"}, )) }) It("tells the user if all plans were already public", func() { actor.UpdateAllPlansForServiceReturns(true, nil) Expect(runCommand([]string{"service"})).To(BeTrue()) Expect(ui.Outputs).To(ContainSubstrings( []string{"All plans of the service", "are already accessible for all orgs"}, []string{"OK"}, )) }) It("tells the user the plans are being updated if they weren't all already public", func() { actor.UpdateAllPlansForServiceReturns(false, nil) Expect(runCommand([]string{"service"})).To(BeTrue()) Expect(ui.Outputs).To(ContainSubstrings( []string{"Enabling access to all plans of service service for all orgs as my-user..."}, []string{"OK"},