github.com/jghiloni/cli@v6.28.1-0.20170628223758-0ce05fe032a2+incompatible/integration/isolated/scale_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("scale command", func() {
    12  	Context("when the wrong data type is provided to -i", func() {
    13  		It("outputs an error message to the user, provides help text, and exits 1", func() {
    14  			session := CF("scale", "some-app", "-i", "not-an-integer")
    15  			Eventually(session.Err).Should(Say("Incorrect Usage: invalid argument for flag `-i' \\(expected int\\)"))
    16  			Eventually(session.Out).Should(Say("cf scale APP_NAME")) // help
    17  			Eventually(session).Should(Exit(1))
    18  		})
    19  	})
    20  })