github.com/DaAlbrecht/cf-cli@v0.0.0-20231128151943-1fe19bb400b9/actor/v7action/version_test.go (about)

     1  package v7action_test
     2  
     3  import (
     4  	. "code.cloudfoundry.org/cli/actor/v7action"
     5  	"code.cloudfoundry.org/cli/actor/v7action/v7actionfakes"
     6  	. "github.com/onsi/ginkgo"
     7  	. "github.com/onsi/gomega"
     8  )
     9  
    10  var _ = Describe("Version Check Actions", func() {
    11  	var (
    12  		actor         *Actor
    13  		fakeUAAClient *v7actionfakes.FakeUAAClient
    14  	)
    15  
    16  	BeforeEach(func() {
    17  		actor, _, _, _, fakeUAAClient, _, _ = NewTestActor()
    18  	})
    19  
    20  	Describe("GetUAAAPIVersion", func() {
    21  		It("returns the UAA API version", func() {
    22  			expectedVersion := "1.96.0"
    23  			fakeUAAClient.GetAPIVersionReturns(expectedVersion, nil)
    24  			retrievedVersion, err := actor.GetUAAAPIVersion()
    25  			Expect(retrievedVersion).To(Equal(expectedVersion))
    26  			Expect(err).NotTo(HaveOccurred())
    27  		})
    28  	})
    29  })