github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/integration/isolated/organization_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("organization command", func() {
    12  	var (
    13  		orgName   string
    14  		spaceName string
    15  		quotaName string
    16  	)
    17  	BeforeEach(func() {
    18  		orgName = helpers.NewOrgName()
    19  		spaceName = helpers.PrefixedRandomName("SPACE")
    20  		quotaName = helpers.PrefixedRandomName("INTEGRATION-QUOTA")
    21  
    22  		setupCF(orgName, spaceName)
    23  		session := helpers.CF("create-quota", quotaName, "-a", "1")
    24  		Eventually(session).Should(Exit(0))
    25  		session = helpers.CF("set-quota", orgName, quotaName)
    26  		Eventually(session).Should(Exit(0))
    27  	})
    28  
    29  	It("successfully displays the organization information", func() {
    30  		session := helpers.CF("org", orgName)
    31  		Eventually(session).Should(Say(orgName))
    32  		Eventually(session).Should(Say("quota:\\s+%s.+1 app instance limit", quotaName))
    33  		Eventually(session).Should(Exit(0))
    34  	})
    35  })