mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
test: share the first-page and clock helpers
writeFirstPage answers paged listings in app and services tests, testNow replaces the copied clock, withoutANSI the second color stripper, and the single-entry table test becomes a plain test. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
23 files changed
+66
-105
No files matched your search
@@ -18,7 +18,7 @@ func TestBulkMilestoneStateContinuesAfterFailureAndKeepsJSONClean(t *testing.T)
|
||||
mutations := []string{}
|
||||
server := newAuthenticatedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path == "/api/v1/repos/alice/project/milestones" {
|
||||
writeMilestones(w, r, `[{"id":9,"title":"v9"},{"id":10,"title":"v10"},{"id":11,"title":"v11"}]`)
|
||||
writeFirstPage(w, r, `[{"id":9,"title":"v9"},{"id":10,"title":"v10"},{"id":11,"title":"v11"}]`)
|
||||
return
|
||||
}
|
||||
id := strings.TrimPrefix(r.URL.Path, "/api/v1/repos/alice/project/milestones/")
|
||||
|
||||
Reference in new issue
Block a user