github.com/jghiloni/cli@v6.28.1-0.20170628223758-0ce05fe032a2+incompatible/integration/isolated/delete_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("delete-quota command", func() {
    12  	var quotaName string
    13  
    14  	BeforeEach(func() {
    15  		setupCF(ReadOnlyOrg, ReadOnlySpace)
    16  		quotaName = helpers.QuotaName()
    17  		session := helpers.CF("create-quota", quotaName)
    18  		Eventually(session).Should(Exit(0))
    19  	})
    20  
    21  	It("deletes a quota", func() {
    22  		session := helpers.CF("delete-quota", quotaName, "-f")
    23  		Eventually(session).Should(Say("Deleting quota %s", quotaName))
    24  		Eventually(session).Should(Exit(0))
    25  
    26  		session = helpers.CF("quota", quotaName)
    27  		Eventually(session).Should(Say("%s.+not found", quotaName))
    28  		Eventually(session).Should(Exit(1))
    29  	})
    30  })