github.com/lukasheimann/cloudfoundrycli@v7.1.0+incompatible/actor/v7action/version_test.go (about) 1 package v7action_test 2 3 import ( 4 . "code.cloudfoundry.org/cli/actor/v7action" 5 "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" 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 *v7actionfakes.FakeCloudControllerClient 14 fakeUAAClient *v7actionfakes.FakeUAAClient 15 ) 16 17 BeforeEach(func() { 18 actor, fakeCloudControllerClient, _, _, fakeUAAClient, _, _ = NewTestActor() 19 }) 20 21 Describe("CloudControllerAPIVersion", func() { 22 It("returns the CC API version", func() { 23 expectedVersion := "3.75.0" 24 fakeCloudControllerClient.CloudControllerAPIVersionReturns(expectedVersion) 25 Expect(actor.CloudControllerAPIVersion()).To(Equal(expectedVersion)) 26 }) 27 }) 28 29 Describe("UAAAPIVersion", func() { 30 It("returns the UAA API version", func() { 31 expectedVersion := "1.96.0" 32 fakeUAAClient.APIVersionReturns(expectedVersion) 33 Expect(actor.UAAAPIVersion()).To(Equal(expectedVersion)) 34 }) 35 }) 36 })