mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11: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
@@ -21,7 +21,7 @@ func repoTTYDeps(t *testing.T, serverURL string) (Dependencies, *bytes.Buffer, *
|
||||
deps, out, diagnostics := serverDeps(t, serverURL)
|
||||
deps.Getenv = serverEnv(serverURL, map[string]string{"TERM": "dumb"})
|
||||
deps.Streams.OutTTY, deps.Streams.Width = true, 100
|
||||
deps.Now = func() time.Time { return time.Date(2026, 10, 11, 20, 0, 0, 0, time.UTC) }
|
||||
deps.Now = func() time.Time { return testNow }
|
||||
return deps, out, diagnostics
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user