Esempio n. 1
0
				))
			})

			It("prints the domain information", func() {
				cmd.Execute(flagContext)
				Expect(ui.Outputs).To(BeInDisplayOrder(
					[]string{"name", "status", "type"},
					[]string{"Shared-domain1", "shared"},
					[]string{"Private-domain1", "owned"},
				))
			})

			Context("when routing api endpoint is not set", func() {
				var originalRoutingApiEndpoint string
				BeforeEach(func() {
					originalRoutingApiEndpoint = configRepo.RoutingApiEndpoint()
					configRepo.SetRoutingApiEndpoint("")
				})

				AfterEach(func() {
					configRepo.SetRoutingApiEndpoint(originalRoutingApiEndpoint)
				})

				It("does not panic", func() {
					Expect(func() { cmd.Execute(flagContext) }).NotTo(Panic())
				})

				Context("when returned domain has a router-group-guid", func() {
					BeforeEach(func() {
						domainFields = []models.DomainFields{
							models.DomainFields{