Add an trailing slash to dashboard links (#29555)
Fix #29533, and add some tests for "base/paginate.tmpl" (cherry picked from commit 8553b4600e3035b6f6ad6907c37cebd013fa4d64) Conflicts: services/contexttest/context_tests.go trivial conflict because "Improve user experience for outdated comments" was skipped
This commit is contained in:
parent
cfce4e089e
commit
de6768ed54
5 changed files with 33 additions and 10 deletions
|
@ -12,6 +12,7 @@ import (
|
|||
"net/url"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
access_model "code.gitea.io/gitea/models/perm/access"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
|
@ -60,8 +61,9 @@ func MockContext(t *testing.T, reqPath string, opts ...MockContextOption) (*cont
|
|||
base.Data = middleware.GetContextData(req.Context())
|
||||
base.Locale = &translation.MockLocale{}
|
||||
|
||||
ctx := context.NewWebContext(base, &MockRender{}, nil)
|
||||
|
||||
ctx := context.NewWebContext(base, opt.Render, nil)
|
||||
ctx.PageData = map[string]any{}
|
||||
ctx.Data["PageStartTime"] = time.Now()
|
||||
chiCtx := chi.NewRouteContext()
|
||||
ctx.Base.AppendContextValue(chi.RouteCtxKey, chiCtx)
|
||||
return ctx, resp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue