github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/actor/v2action/version_test.go (about)

     1  package v2action_test
     2  
     3  import (
     4  	. "github.com/liamawhite/cli-with-i18n/actor/v2action"
     5  	"github.com/liamawhite/cli-with-i18n/actor/v2action/v2actionfakes"
     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 *v2actionfakes.FakeCloudControllerClient
    14  	)
    15  
    16  	BeforeEach(func() {
    17  		fakeCloudControllerClient = new(v2actionfakes.FakeCloudControllerClient)
    18  		actor = NewActor(fakeCloudControllerClient, nil, nil)
    19  	})
    20  
    21  	Describe("CloudControllerAPIVersion", func() {
    22  		It("returns the V2 CC API version", func() {
    23  			expectedVersion := "2.75.0"
    24  			fakeCloudControllerClient.APIVersionReturns(expectedVersion)
    25  			Expect(actor.CloudControllerAPIVersion()).To(Equal(expectedVersion))
    26  		})
    27  	})
    28  })