mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-31 06:34:00 +00:00
chore: move template context (#8663)
The template module now holds the **Template** context, this makes it possible for (render) function in the template module to access functions and share data between render functions. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8663 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Reviewed-by: Lucas <sclu1034@noreply.codeberg.org> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
parent
61334f7982
commit
d4e4a2a1e3
16 changed files with 88 additions and 70 deletions
|
@ -1524,3 +1524,15 @@ func TestIssuePostersSearch(t *testing.T) {
|
|||
assert.EqualValues(t, 1, data.Results[0].UserID)
|
||||
})
|
||||
}
|
||||
|
||||
func TestIssueTimelineLabels(t *testing.T) {
|
||||
defer tests.PrepareTestEnv(t)()
|
||||
|
||||
req := NewRequest(t, "GET", "/user2/repo1/issues/1")
|
||||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
assert.NotContains(t, resp.Body.String(), `status-page-500`)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
filterLinks := htmlDoc.Find(".timeline .labels-list a")
|
||||
assert.Equal(t, 9, filterLinks.Length())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue