github.com/jghiloni/cli@v6.28.1-0.20170628223758-0ce05fe032a2+incompatible/integration/isolated/unset_space_quota_command_test.go (about) 1 package isolated 2 3 import ( 4 "code.cloudfoundry.org/cli/integration/helpers" 5 . "github.com/onsi/ginkgo" 6 . "github.com/onsi/gomega" 7 . "github.com/onsi/gomega/gbytes" 8 . "github.com/onsi/gomega/gexec" 9 ) 10 11 var _ = Describe("unset-space-quota command", func() { 12 var ( 13 orgName string 14 spaceName string 15 quotaName string 16 ) 17 BeforeEach(func() { 18 orgName = helpers.NewOrgName() 19 spaceName = helpers.NewSpaceName() 20 21 setupCF(orgName, spaceName) 22 quotaName = helpers.QuotaName() 23 session := helpers.CF("create-space-quota", quotaName) 24 Eventually(session).Should(Exit(0)) 25 26 session = helpers.CF("set-space-quota", spaceName, quotaName) 27 Eventually(session).Should(Exit(0)) 28 }) 29 30 It("unsets the space quota on a space", func() { 31 session := helpers.CF("unset-space-quota", spaceName, quotaName) 32 Eventually(session).Should(Say("Unassigning space quota %s from space %s", quotaName, spaceName)) 33 Eventually(session).Should(Exit(0)) 34 35 session = helpers.CF("space", spaceName, "-v") 36 Eventually(session).Should(Say(`"space_quota_definition_guid": null`)) 37 Eventually(session).Should(Exit(0)) 38 }) 39 })