mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
DEV: allow API for list_suggested_for to exclude random (#20857)
This is needed so plugins can potentially create lists without random topics
This commit is contained in:
@ -1379,6 +1379,10 @@ RSpec.describe TopicQuery do
|
||||
it "should return the new topic" do
|
||||
expect(TopicQuery.new.list_suggested_for(topic).topics).to eq([new_topic])
|
||||
end
|
||||
|
||||
it "should return the nothing when random topics excluded" do
|
||||
expect(TopicQuery.new.list_suggested_for(topic, include_random: false).topics).to eq([])
|
||||
end
|
||||
end
|
||||
|
||||
context "when anonymously browsing with invisible, closed and archived" do
|
||||
|
Reference in New Issue
Block a user