github.com/jenspinney/cli@v6.42.1-0.20190207184520-7450c600020e+incompatible/actor/v2v3action/version_test.go (about)

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