large refactor, ship a few columns from the user table into user_stats

This commit is contained in:
Sam
2013-10-04 13:28:49 +10:00
parent 4613006ae3
commit 5bf26ec34e
29 changed files with 354 additions and 251 deletions

View File

@@ -163,12 +163,15 @@ describe PostCreator do
topic_user.seen_post_count.should == first_post.post_number
user2 = Fabricate(:coding_horror)
user2.topic_reply_count.should == 0
first_post.user.reload.topic_reply_count.should == 0
user2.user_stat.topic_reply_count.should == 0
first_post.user.user_stat.reload.topic_reply_count.should == 0
PostCreator.new(user2, topic_id: first_post.topic_id, raw: "this is my test post 123").create
user2.reload.topic_reply_count.should == 1
first_post.user.reload.topic_reply_count.should == 0
first_post.user.user_stat.reload.topic_reply_count.should == 0
user2.user_stat.reload.topic_reply_count.should == 1
end
end