FIX: Link to group didn't work in locales other than English (#30237)

Group names are translated, so the slug changes depending on the default locale. This could break the link to the staff group.
This commit is contained in:
Gerhard Schlager
2024-12-12 13:26:51 +01:00
committed by GitHub
parent 35ee746a14
commit c357e621ef
3 changed files with 9 additions and 3 deletions

View File

@ -1144,7 +1144,13 @@ RSpec.describe DiscourseNarrativeBot::NewUserNarrative do
new_post = Post.last
expected_raw = <<~RAW
#{I18n.t("discourse_narrative_bot.new_user_narrative.flag.reply", base_uri: "")}
#{
I18n.t(
"discourse_narrative_bot.new_user_narrative.flag.reply",
base_uri: "",
group_url: Group.find(Group::AUTO_GROUPS[:staff]).full_url,
)
}
#{I18n.t("discourse_narrative_bot.new_user_narrative.search.instructions", base_uri: "")}
RAW