ui = new(testterm.FakeUI) configRepo = testconfig.NewRepositoryWithDefaults() requirementsFactory = &testreq.FakeReqFactory{LoginSuccess: true, TargetedSpaceSuccess: true} zipper = &fakeappfiles.FakeZipper{} app_files = &fakeappfiles.FakeAppFiles{} actor = &fakeactors.FakePushActor{} zoneRepo.Zones = []models.Zone{ models.Zone{ models.ZoneFields{ Name: "my-zone", Guid: "my-zone-guid", }, }, models.Zone{ models.ZoneFields{ Name: "differentZone", Guid: "differentZone-guid", }, }, } cmd = NewPush(ui, configRepo, manifestRepo, starter, stopper, serviceBinder, appRepo, domainRepo, routeRepo, stackRepo, serviceRepo, authRepo, wordGenerator,
Expect(testcmd.CommandDidPassRequirements).To(BeFalse()) }) }) Context("when there are zones to be listed", func() { BeforeEach(func() { zoneRepo.Zones = []models.Zone{ models.Zone{ models.ZoneFields{ Name: "Zone-1", IsPublic: true, }, }, models.Zone{ models.ZoneFields{ Name: "Zone-2", IsPublic: true, }, }, models.Zone{ models.ZoneFields{ Name: "Zone-3", IsPublic: true, }, }, } }) It("lists zones", func() { runCommand() Expect(ui.Outputs).To(ContainSubstrings(