mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-01 03:17:53 -05:00
4981525047
- Upgrades Ember to latest - Fixes a bunch of bugs with page titles and missing "active" states
32 lines
680 B
Ruby
32 lines
680 B
Ruby
require 'spec_helper'
|
|
require_dependency 'jobs/scheduled/periodical_updates'
|
|
|
|
describe Jobs::PeriodicalUpdates do
|
|
|
|
after do
|
|
Jobs::PeriodicalUpdates.new.execute(nil)
|
|
end
|
|
|
|
it "calculates avg post time" do
|
|
Post.expects(:calculate_avg_time).once
|
|
end
|
|
|
|
it "calculates avg topic time" do
|
|
Topic.expects(:calculate_avg_time).once
|
|
end
|
|
|
|
it "features topics" do
|
|
CategoryFeaturedTopic.expects(:feature_topics).once
|
|
end
|
|
|
|
it "updates view counts" do
|
|
UserStat.expects(:update_view_counts).once
|
|
end
|
|
|
|
it "calculates scores" do
|
|
calculator = mock()
|
|
ScoreCalculator.expects(:new).once.returns(calculator)
|
|
calculator.expects(:calculate)
|
|
end
|
|
|
|
end
|