Beispiel #1
0
				It("gets the login prompts", func() {
					Expect(prompts).To(Equal(map[string]core_config.AuthPrompt{
						"username": core_config.AuthPrompt{
							DisplayName: "Email",
							Type:        core_config.AuthPromptTypeText,
						},
						"pin": core_config.AuthPrompt{
							DisplayName: "PIN Number",
							Type:        core_config.AuthPromptTypePassword,
						},
					}))
				})

				It("saves the UAA server to the config", func() {
					Expect(config.UaaEndpoint()).To(Equal("https://uaa.run.pivotal.io"))
				})
			})

			Describe("when the login info API fails", func() {
				BeforeEach(func() {
					setupTestServer(loginServerLoginFailureRequest)
				})

				It("returns a failure response when the login info API fails", func() {
					Expect(handler).To(HaveAllRequestsCalled())
					Expect(apiErr).To(HaveOccurred())
					Expect(prompts).To(BeEmpty())
				})
			})