flagContext.Parse("-m", "whoops", "wit mah hussle") cmd.SetDependency(deps, false) }) It("alerts the user when parsing the memory limit fails", func() { Expect(runCLIErr).To(HaveOccurred()) runCLIErrStr := runCLIErr.Error() Expect(runCLIErrStr).To(ContainSubstring("Invalid memory limit: whoops")) Expect(runCLIErrStr).To(ContainSubstring("Byte quantity must be an integer with a unit of measurement like M, MB, G, or GB")) }) }) Context("when the request fails", func() { BeforeEach(func() { flagContext.Parse("my-quota") quotaRepo.CreateReturns(errors.New("WHOOP THERE IT IS")) cmd.SetDependency(deps, false) }) It("alets the user when creating the quota fails", func() { Expect(runCLIErr).To(HaveOccurred()) Expect(ui.Outputs()).To(ContainSubstrings( []string{"Creating space quota", "my-quota", "my-org"}, )) Expect(runCLIErr.Error()).To(Equal("WHOOP THERE IT IS")) }) }) Context("when the quota already exists", func() { BeforeEach(func() { flagContext.Parse("my-quota")