mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 16:07:17 +08:00
large refactor, ship a few columns from the user table into user_stats
This commit is contained in:
@ -9,13 +9,13 @@ describe UserVisit do
|
||||
u.update_visit_record!(1.day.ago.to_date)
|
||||
|
||||
u.reload
|
||||
u.days_visited.should == 2
|
||||
u.user_stat.days_visited.should == 2
|
||||
|
||||
u.days_visited = 1
|
||||
u.user_stat.days_visited = 1
|
||||
u.save
|
||||
UserVisit.ensure_consistency!
|
||||
|
||||
u.reload
|
||||
u.days_visited.should == 2
|
||||
u.user_stat.days_visited.should == 2
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user