本文整理匯總了Golang中testhelpers/api.FakeRouteRepository.BindErr方法的典型用法代碼示例。如果您正苦於以下問題:Golang FakeRouteRepository.BindErr方法的具體用法?Golang FakeRouteRepository.BindErr怎麽用?Golang FakeRouteRepository.BindErr使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類testhelpers/api.FakeRouteRepository
的用法示例。
在下文中一共展示了FakeRouteRepository.BindErr方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
callPush("app")
testassert.SliceContains(ui.Outputs, testassert.Lines{
{"Uploading"},
{"FAILED"},
})
})
Describe("when binding the route fails", func() {
BeforeEach(func() {
routeRepo.FindByHostAndDomainRoute.Host = "existing-app"
routeRepo.FindByHostAndDomainRoute.Domain = models.DomainFields{Name: "foo.cf-app.com"}
})
It("suggests using 'random-route' if the default route is taken", func() {
routeRepo.BindErr = errors.NewHttpError(400, errors.INVALID_RELATION, "The URL not available")
callPush("existing-app")
testassert.SliceContains(ui.Outputs, testassert.Lines{
{"FAILED"},
{"existing-app.foo.cf-app.com", "already in use"},
{"TIP", "random-route"},
})
})
It("does not suggest using 'random-route' for other failures", func() {
routeRepo.BindErr = errors.NewHttpError(500, "some-code", "exception happened")
callPush("existing-app")