github.com/wanddynosios/cli@v7.1.0+incompatible/integration/v6/global/disable_feature_flags_command_test.go (about)

     1  package global
     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("disable-feature-flags command", func() {
    12  	BeforeEach(func() {
    13  		helpers.LoginCF()
    14  	})
    15  
    16  	AfterEach(func() {
    17  		session := helpers.CF("enable-feature-flag", "private_domain_creation")
    18  		Eventually(session).Should(Exit(0))
    19  	})
    20  
    21  	It("disables a feature flag", func() {
    22  		session := helpers.CF("disable-feature-flag", "private_domain_creation")
    23  		Eventually(session).Should(Say("Setting status of private_domain_creation as"))
    24  		Eventually(session).Should(Say("OK"))
    25  		Eventually(session).Should(Exit(0))
    26  
    27  		session = helpers.CF("feature-flag", "private_domain_creation")
    28  		Eventually(session).Should(Say(`private_domain_creation\s+disabled`))
    29  		Eventually(session).Should(Exit(0))
    30  	})
    31  })