Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 0feb895

Browse files
committed
test added
1 parent 9b1e4d4 commit 0feb895

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spec/lib/modules/summarization/strategies/topic_summary_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,21 @@
6161
expect(op_content).to include(topic_embed.embed_content_cache)
6262
end
6363
end
64+
65+
context "when enable_names enabled and prioritize_username_in_ux disabled" do
66+
fab!(:user) { Fabricate(:user, name: "test") }
67+
68+
it "includes the name" do
69+
SiteSetting.enable_names = true
70+
SiteSetting.prioritize_username_in_ux = false
71+
72+
post_1.update!(user: user)
73+
74+
content = topic_summary.targets_data
75+
poster_name = content.first[:poster]
76+
77+
expect(poster_name).to eq("test")
78+
end
79+
end
6480
end
6581
end

0 commit comments

Comments
 (0)