本文整理匯總了Golang中github.com/concourse/atc/db/fakes.FakePipelineDB.GetJobBuildsCallCount方法的典型用法代碼示例。如果您正苦於以下問題:Golang FakePipelineDB.GetJobBuildsCallCount方法的具體用法?Golang FakePipelineDB.GetJobBuildsCallCount怎麽用?Golang FakePipelineDB.GetJobBuildsCallCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/concourse/atc/db/fakes.FakePipelineDB
的用法示例。
在下文中一共展示了FakePipelineDB.GetJobBuildsCallCount方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
Describe("GET /api/v1/pipelines/:pipeline_name/jobs/:job_name/builds", func() {
var response *http.Response
var queryParams string
JustBeforeEach(func() {
var err error
pipelineDB.GetPipelineNameReturns("some-pipeline")
response, err = client.Get(server.URL + "/api/v1/pipelines/some-pipeline/jobs/some-job/builds" + queryParams)
Expect(err).NotTo(HaveOccurred())
})
Context("when no params are passed", func() {
It("does not set defaults for since and until", func() {
Expect(pipelineDB.GetJobBuildsCallCount()).To(Equal(1))
jobName, page := pipelineDB.GetJobBuildsArgsForCall(0)
Expect(jobName).To(Equal("some-job"))
Expect(page).To(Equal(db.Page{
Since: 0,
Until: 0,
Limit: 100,
}))
})
})
Context("when all the params are passed", func() {
BeforeEach(func() {
queryParams = "?since=2&until=3&limit=8"
})