github.com/sleungcy/cli@v7.1.0+incompatible/actor/v2action/version_test.go (about) 1 package v2action_test 2 3 import ( 4 . "code.cloudfoundry.org/cli/actor/v2action" 5 "code.cloudfoundry.org/cli/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 fakeUAAClient *v2actionfakes.FakeUAAClient 15 ) 16 17 BeforeEach(func() { 18 actor, fakeCloudControllerClient, fakeUAAClient, _ = NewTestActor() 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 29 Describe("UAAAPIVersion", func() { 30 It("returns the V2 CC API version", func() { 31 expectedVersion := "1.96.0" 32 fakeUAAClient.APIVersionReturns(expectedVersion) 33 Expect(actor.UAAAPIVersion()).To(Equal(expectedVersion)) 34 }) 35 }) 36 })