mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-27 03:21:25 +01:00
fix(repo): README lookup like Gitea, clearer branch/org errors, clone-after-create report, mirror interval 0 and search sort (follow gh)
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
16 files changed
+211
-37
No files matched your search
@@ -385,6 +385,20 @@ func TestInstanceCompletions(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCompleteArgumentBranchesUsesTheNamedRepository(t *testing.T) {
|
||||
server := newAuthenticatedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
require.Equal(t, "/api/v1/repos/bob/tool/branches", r.URL.Path)
|
||||
_, _ = w.Write([]byte(`[{"name":"develop"}]`))
|
||||
}))
|
||||
defer server.Close()
|
||||
deps, _, _ := serverDeps(t, server.URL)
|
||||
a := &application{deps: deps}
|
||||
cmd := &cobra.Command{}
|
||||
cmd.SetContext(context.Background())
|
||||
values, _ := a.completeArgumentBranches()(cmd, []string{"bob/tool"}, "")
|
||||
require.Equal(t, []string{"develop"}, values)
|
||||
}
|
||||
|
||||
func TestCompletionInstallHelp(t *testing.T) {
|
||||
deps, out, _ := testDeps(t)
|
||||
require.NoError(t, Execute(context.Background(), deps, []string{"completion", "bash", "--help"}))
|
||||
|
||||
Reference in new issue
Block a user