Describe("Execute", func() {
		var runCLIErr error

		BeforeEach(func() {
			orgFields := models.OrganizationFields{
				Name: "my-org",
				GUID: "my-org-guid",
			}

			config.OrganizationFieldsReturns(orgFields)
			config.UsernameReturns("my-user")
		})

		JustBeforeEach(func() {
			cmd.SetDependency(deps, false)
			runCLIErr = cmd.Execute(flagContext)
		})

		Context("when creating a quota succeeds", func() {
			Context("without any flags", func() {
				BeforeEach(func() {
					flagContext.Parse("my-quota")
				})

				It("creates a quota with a given name", func() {
					Expect(quotaRepo.CreateArgsForCall(0).Name).To(Equal("my-quota"))
					Expect(quotaRepo.CreateArgsForCall(0).OrgGUID).To(Equal("my-org-guid"))
					Expect(ui.Outputs()).To(ContainSubstrings(
						[]string{"Creating space quota", "my-quota", "my-org", "my-user", "..."},
						[]string{"OK"},
					))