Beispiel #1
0
					[]string{"Getting domains in org", "my-org", "my-user"},
					[]string{"name", "status"},
					[]string{"The-shared-domain", "shared"},
					[]string{"Private-domain1", "owned"},
					[]string{"Private-domain2", "owned"},
				))
			})
		})

		It("displays a message when no domains are found", func() {
			runCommand()
			Expect(ui.Outputs).To(ContainSubstrings(
				[]string{"Getting domains in org", "my-org", "my-user"},
				[]string{"No domains found"},
			))
		})

		It("fails when the domains API returns an error", func() {
			domainRepo.ListDomainsForOrgApiResponse = errors.New("borked!")
			runCommand()

			Expect(ui.Outputs).To(ContainSubstrings(
				[]string{"Getting domains in org", "my-org", "my-user"},
				[]string{"FAILED"},
				[]string{"Failed fetching domains"},
				[]string{"borked!"},
			))
		})
	})
})