From 3d1b8f47c0c41242117cc13cc661c94beb6388c9 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 28 Jul 2024 08:58:59 +0200 Subject: [PATCH] Use GetDisplayName() instead of DisplayName() to generate rss feeds (followup) The test only exists in Forgejo and the behavior it verifies now require setting.UI.DefaultShowFullName to be true. --- tests/integration/api_feed_plain_text_titles_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/api_feed_plain_text_titles_test.go b/tests/integration/api_feed_plain_text_titles_test.go index a058b7321c..b1247780d8 100644 --- a/tests/integration/api_feed_plain_text_titles_test.go +++ b/tests/integration/api_feed_plain_text_titles_test.go @@ -7,6 +7,8 @@ import ( "net/http" "testing" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/test" "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" @@ -15,6 +17,7 @@ import ( func TestFeedPlainTextTitles(t *testing.T) { // This test verifies that items' titles in feeds are generated as plain text. // See https://codeberg.org/forgejo/forgejo/pulls/1595 + defer test.MockVariableValue(&setting.UI.DefaultShowFullName, true)() t.Run("Feed plain text titles", func(t *testing.T) { t.Run("Atom", func(t *testing.T) {