github.com/sleungcy/cli@v7.1.0+incompatible/integration/v7/isolated/auth_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("auth command", func() {
    12  
    13  	BeforeEach(func() {
    14  		helpers.SkipIfClientCredentialsTestMode()
    15  	})
    16  
    17  	When("too many arguments are provided", func() {
    18  		It("displays an 'extra argument' error message", func() {
    19  			session := helpers.CF("auth", "some-username", "some-password", "garbage")
    20  
    21  			Eventually(session.Err).Should(Say("Incorrect Usage: unexpected argument \"garbage\""))
    22  			Eventually(session).Should(Say("NAME:"))
    23  
    24  			Eventually(session).Should(Exit(1))
    25  		})
    26  	})
    27  })