github.com/DaAlbrecht/cf-cli@v0.0.0-20231128151943-1fe19bb400b9/integration/v7/isolated/revision_command_test.go (about)

     1  package isolated
     2  
     3  import (
     4  	. "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers"
     5  	"code.cloudfoundry.org/cli/integration/helpers"
     6  	. "github.com/onsi/ginkgo"
     7  	. "github.com/onsi/gomega"
     8  	. "github.com/onsi/gomega/gbytes"
     9  	. "github.com/onsi/gomega/gexec"
    10  )
    11  
    12  var _ = Describe("revision command", func() {
    13  	Describe("help", func() {
    14  		When("--help flag is set", func() {
    15  			It("appears in cf help -a", func() {
    16  				session := helpers.CF("help", "-a")
    17  				Eventually(session).Should(Exit(0))
    18  				Expect(session).To(HaveCommandInCategoryWithDescription("revision", "EXPERIMENTAL COMMANDS", "Show details for a specific app revision"))
    19  			})
    20  
    21  			It("Displays revision command usage to output", func() {
    22  				session := helpers.CF("revision", "--help")
    23  
    24  				Eventually(session).Should(Exit(0))
    25  
    26  				Expect(session).To(Say("NAME:"))
    27  				Expect(session).To(Say("revision - Show details for a specific app revision"))
    28  				Expect(session).To(Say("USAGE:"))
    29  				Expect(session).To(Say(`cf revision APP_NAME [--version VERSION]`))
    30  				Expect(session).To(Say("OPTIONS:"))
    31  				Expect(session).To(Say("--version      The integer representing the specific revision to show"))
    32  				Expect(session).To(Say("SEE ALSO:"))
    33  				Expect(session).To(Say("revisions, rollback"))
    34  			})
    35  		})
    36  	})
    37  })