github.com/nimakaviani/cli@v6.37.1-0.20180619223813-e734901a73fa+incompatible/actor/pushaction/version_test.go (about) 1 package pushaction_test 2 3 import ( 4 . "code.cloudfoundry.org/cli/actor/pushaction" 5 "code.cloudfoundry.org/cli/actor/pushaction/pushactionfakes" 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 fakeV2Actor *pushactionfakes.FakeV2Actor 14 ) 15 16 BeforeEach(func() { 17 fakeV2Actor = new(pushactionfakes.FakeV2Actor) 18 actor = NewActor(fakeV2Actor, nil, nil) 19 }) 20 21 Describe("CloudControllerAPIVersion", func() { 22 It("returns the V2 CC API version", func() { 23 expectedVersion := "2.75.0" 24 fakeV2Actor.CloudControllerAPIVersionReturns(expectedVersion) 25 Expect(actor.CloudControllerV2APIVersion()).To(Equal(expectedVersion)) 26 }) 27 }) 28 })