github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/integration/shared/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  		helpers.LoginCF()
    16  		helpers.TargetOrgAndSpace(ReadOnlyOrg, ReadOnlySpace)
    17  		quotaName = helpers.QuotaName()
    18  		session := helpers.CF("create-quota", quotaName)
    19  		Eventually(session).Should(Exit(0))
    20  	})
    21  
    22  	It("deletes a quota", func() {
    23  		session := helpers.CF("delete-quota", quotaName, "-f")
    24  		Eventually(session).Should(Say("Deleting quota %s", quotaName))
    25  		Eventually(session).Should(Exit(0))
    26  
    27  		session = helpers.CF("quota", quotaName)
    28  		Eventually(session).Should(Say("%s.+not found", quotaName))
    29  		Eventually(session).Should(Exit(1))
    30  	})
    31  })