github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+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("Task 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)
    19  	})
    20  
    21  	Describe("APIVersion", func() {
    22  		It("returns back the 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  })