mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
large refactor, ship a few columns from the user table into user_stats
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user