mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix: reconcile the repository, platform and admin streams
Share one yesNo helper, drop the unused confirmTyped now that typed confirmations go through confirmAction, keep Markdown raw in view tests through the markdown preference, and print doctor latency in whole milliseconds so fast instances do not show 0s. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
6 files changed
+18
-27
No files matched your search
@@ -86,7 +86,8 @@ func TestRepoViewShowsStateAndReadme(t *testing.T) {
|
||||
}))
|
||||
defer server.Close()
|
||||
deps, out, _ := repoTTYDeps(t, server.URL)
|
||||
deps.Getenv = serverEnv(server.URL, map[string]string{"TERM": "dumb", "TEA_MARKDOWN": "raw"})
|
||||
deps.Getenv = serverEnv(server.URL, map[string]string{"TERM": "dumb"})
|
||||
rawMarkdown(t, deps)
|
||||
require.NoError(t, Execute(context.Background(), deps, []string{"repo", "view", "bob/project", "--branch", "develop"}))
|
||||
require.Equal(t, `bob/project
|
||||
public • fork • archived (read-only) • ★ 1 · 0 forks · 2 open issues · 1 open pull request · updated about 1 hour ago
|
||||
@@ -150,7 +151,8 @@ func TestRepoViewOfAnEmptyRepositorySkipsTheReadme(t *testing.T) {
|
||||
}))
|
||||
defer server.Close()
|
||||
deps, out, _ := repoTTYDeps(t, server.URL)
|
||||
deps.Getenv = serverEnv(server.URL, map[string]string{"TERM": "dumb", "TEA_MARKDOWN": "raw"})
|
||||
deps.Getenv = serverEnv(server.URL, map[string]string{"TERM": "dumb"})
|
||||
rawMarkdown(t, deps)
|
||||
require.NoError(t, Execute(context.Background(), deps, []string{"repo", "view", "alice/empty"}))
|
||||
require.Contains(t, out.String(), "private • empty • ★ 0")
|
||||
require.Contains(t, out.String(), "_This repository is empty._")
|
||||
|
||||
Reference in new issue
Block a user