github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/actor/v3action/version_test.go (about)

     1  package v3action_test
     2  
     3  import (
     4  	. "code.cloudfoundry.org/cli/actor/v3action"
     5  	"code.cloudfoundry.org/cli/actor/v3action/v3actionfakes"
     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  		fakeCloudControllerClient *v3actionfakes.FakeCloudControllerClient
    14  	)
    15  
    16  	BeforeEach(func() {
    17  		fakeCloudControllerClient = new(v3actionfakes.FakeCloudControllerClient)
    18  		actor = NewActor(fakeCloudControllerClient, nil, nil, nil)
    19  	})
    20  
    21  	Describe("CloudControllerAPIVersion", func() {
    22  		It("returns the V3 CC API version", func() {
    23  			expectedVersion := "3.0.0-alpha.5"
    24  			fakeCloudControllerClient.CloudControllerAPIVersionReturns(expectedVersion)
    25  			Expect(actor.CloudControllerAPIVersion()).To(Equal(expectedVersion))
    26  		})
    27  	})
    28  })