github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/uaa/info_test.go (about) 1 package uaa_test 2 3 import ( 4 . "code.cloudfoundry.org/cli/api/uaa" 5 6 . "github.com/onsi/ginkgo" 7 . "github.com/onsi/gomega" 8 ) 9 10 var _ = Describe("Info", func() { 11 var info Info 12 13 Describe("LoginLink", func() { 14 BeforeEach(func() { 15 info.Links.Login = "login-something" 16 }) 17 18 It("returns the Login Link", func() { 19 Expect(info.LoginLink()).To(Equal("login-something")) 20 }) 21 }) 22 23 Describe("UAALink", func() { 24 BeforeEach(func() { 25 info.Links.UAA = "uaa-something" 26 }) 27 28 It("returns the UAA Link", func() { 29 Expect(info.UAALink()).To(Equal("uaa-something")) 30 }) 31 }) 32 33 Describe("NewInfo", func() { 34 When("provided a default link", func() { 35 It("sets the links to the provided link", func() { 36 info = NewInfo("uaa-url", "auth-url") 37 Expect(info.LoginLink()).To(Equal("auth-url")) 38 Expect(info.UAALink()).To(Equal("uaa-url")) 39 }) 40 }) 41 }) 42 })