mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 22:35:03 +08:00
Break down new topic counts by category if a digest contains many.
This commit is contained in:
@ -1194,17 +1194,17 @@ describe Topic do
|
||||
let(:user) { Fabricate.build(:user) }
|
||||
|
||||
it "returns none when there are no topics" do
|
||||
Topic.for_digest(user, 1.year.ago).should be_blank
|
||||
Topic.for_digest(user, 1.year.ago, top_order: true).should be_blank
|
||||
end
|
||||
|
||||
it "doesn't return category topics" do
|
||||
Fabricate(:category)
|
||||
Topic.for_digest(user, 1.year.ago).should be_blank
|
||||
Topic.for_digest(user, 1.year.ago, top_order: true).should be_blank
|
||||
end
|
||||
|
||||
it "returns regular topics" do
|
||||
topic = Fabricate(:topic)
|
||||
Topic.for_digest(user, 1.year.ago).should == [topic]
|
||||
Topic.for_digest(user, 1.year.ago, top_order: true).should == [topic]
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user