mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Add a test for longest running projects
This commit is contained in:
parent
500892e1a4
commit
eaedd53875
1 changed files with 3 additions and 0 deletions
|
|
@ -51,6 +51,9 @@ class StatsControllerTest < ActionController::TestCase
|
|||
assert_equal 4, totals.tags
|
||||
assert_equal 2, totals.unique_tags
|
||||
|
||||
longest_running_projects = assigns['stats'].projects.runtime
|
||||
assert_equal longest_running_projects, users(:admin_user).projects.order('created_at').reverse
|
||||
|
||||
Time.zone = users(:admin_user).prefs.time_zone # calculations are done in users timezone
|
||||
assert_equal 2.weeks.ago.at_midnight, totals.first_action_at.at_midnight
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue