示例#1
0
				actor.GatherFilesReturns([]resources.AppFileResource{}, false, errors.New("failed to get file mode"))

				callPush("app-name")

				Expect(ui.Outputs).To(ContainSubstrings(
					[]string{"failed to get file mode"},
				))
			})

			It("binds to existing routes", func() {
				callPush("app-name")

				Expect(routeRepo.CreateCallCount()).To(BeZero())

				Expect(routeRepo.FindByHostAndDomainCallCount()).To(Equal(1))
				host, _ := routeRepo.FindByHostAndDomainArgsForCall(0)
				Expect(host).To(Equal("app-name"))

				Expect(routeRepo.BindCallCount()).To(Equal(1))
				boundRouteGUID, boundAppGUID := routeRepo.BindArgsForCall(0)
				Expect(boundAppGUID).To(Equal("app-name-guid"))
				Expect(boundRouteGUID).To(Equal("my-route-guid"))

				Expect(ui.Outputs).To(ContainSubstrings(
					[]string{"Using", "app-name.foo.cf-app.com"},
					[]string{"Binding", "app-name.foo.cf-app.com"},
					[]string{"OK"},
				))
			})
		})