Merge pull request #290 from alxndr/category-rss

RSS for topics in a category
This commit is contained in:
Robin Ward
2013-03-01 12:01:26 -08:00
11 changed files with 85 additions and 12 deletions

View File

@ -1033,4 +1033,17 @@ describe Topic do
end
describe 'scopes' do
describe '#by_most_recently_created' do
it 'returns topics ordered by created_at desc, id desc' do
now = Time.now
a = Fabricate(:topic, created_at: now - 2.minutes)
b = Fabricate(:topic, created_at: now)
c = Fabricate(:topic, created_at: now)
d = Fabricate(:topic, created_at: now - 2.minutes)
Topic.by_newest.should == [c,b,d,a]
end
end
end
end