added option that allows users to decide when they consider topics new (default 2 days old or newer)

added site_setting to control the default new_topic_duration_minutes
added 10 minutes option for auto_track_topics_after_msecs, default bumped up to 5 mins
This commit is contained in:
Sam Saffron
2013-02-14 17:32:58 +11:00
parent cdff5a5a77
commit 87d83802b9
14 changed files with 95 additions and 18 deletions

View File

@ -155,6 +155,14 @@ describe TopicQuery do
topics.should == [new_topic]
end
it "contains no new topics for a user that has missed the window" do
user.new_topic_duration_minutes = 5
user.save
new_topic.created_at = 10.minutes.ago
new_topic.save
topics.should == []
end
context "muted topics" do
before do
new_topic.notify_muted!(user)