mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 05:25:16 -05:00
FEATURE: digest emails will try to choose topics from your tracked and watched categories first
This commit is contained in:
@@ -1382,6 +1382,16 @@ describe Topic do
|
||||
expect(Topic.for_digest(user, 1.year.ago, top_order: true)).to eq([topic])
|
||||
end
|
||||
|
||||
it "sorts by category notification levels" do
|
||||
category1, category2 = Fabricate(:category), Fabricate(:category)
|
||||
2.times {|i| Fabricate(:topic, category: category1) }
|
||||
topic1 = Fabricate(:topic, category: category2)
|
||||
2.times {|i| Fabricate(:topic, category: category1) }
|
||||
CategoryUser.create(user: user, category: category2, notification_level: CategoryUser.notification_levels[:watching])
|
||||
for_digest = Topic.for_digest(user, 1.year.ago, top_order: true)
|
||||
expect(for_digest.first).to eq(topic1)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe 'secured' do
|
||||
|
||||
Reference in New Issue
Block a user