Break down new topic counts by category if a digest contains many.

This commit is contained in:
Robin Ward
2014-04-17 16:42:40 -04:00
parent 0e56157212
commit 64faee0935
7 changed files with 57 additions and 16 deletions

View File

@ -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