fix: failing backend tests (#9310)

The tests introduced by #9181 are updated to match the new behaviour of #9182.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9310
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
This commit is contained in:
Robert Wolff 2025-09-15 23:54:56 +02:00 committed by Gusted
commit 30413435d8

View file

@ -1202,7 +1202,7 @@ func TestRender_FilePreview(t *testing.T) {
`</table>` +
`</div>` +
`</div>`
linkRendered := `<a href="` + commitFileURLFirstLine + `" rel="nofollow"><code>eeb243c339/path/to/file%20%23.txt (L1)</code></a>`
linkRendered := `<a href="` + commitFileURLFirstLine + `" rel="nofollow"><code>eeb243c339/path/to/file #.txt (L1)</code></a>`
t.Run("file with strange characters in name", func(t *testing.T) {
testRender(