Пример #1
0
		})
	})

	Context("when the domain is shared", func() {
		BeforeEach(func() {
			domainRepo.FindByNameInOrgReturns(
				models.DomainFields{
					Name:   "foo1.com",
					Guid:   "foo1-guid",
					Shared: true,
				}, nil)
		})
		It("informs the user that the domain is shared", func() {
			runCommand("foo1.com")

			Expect(domainRepo.DeleteCallCount()).To(BeZero())
			Expect(ui.Outputs).To(ContainSubstrings(
				[]string{"FAILED"},
				[]string{"domain"},
				[]string{"foo1.com"},
				[]string{"is a shared domain, not an owned domain."},
				[]string{"TIP"},
				[]string{"Use `cf delete-shared-domain` to delete shared domains."},
			))

		})
	})
	Context("when the domain exists", func() {
		BeforeEach(func() {
			domainRepo.FindByNameInOrgReturns(
				models.DomainFields{