}) Context("when the default route for the app already exists", func() { BeforeEach(func() { route := models.Route{} route.Guid = "my-route-guid" route.Host = "my-new-app" route.Domain = domainRepo.ListDomainsForOrgDomains[0] routeRepo.FindByHostAndDomainReturns.Route = route }) It("calls actor.PopulateFileMode() to get file mdoes", func() { callPush("my-new-app") Expect(actor.PopulateFileModeCallCount()).To(Equal(1)) }) It("notifies users about the error actor.PopulateFileMode() returns", func() { actor.PopulateFileModeReturns([]resources.AppFileResource{}, errors.New("failed to get file mode")) callPush("my-new-app") Expect(ui.Outputs).To(ContainSubstrings( []string{"failed to get file mode"}, )) }) It("binds to existing routes", func() { callPush("my-new-app")