mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-22 18:20:12 +01:00
Refactor last year chart
Pulled some instance variable assignment into the controller. Also extracted a method regarding interpolated values for the present month.
This commit is contained in:
parent
0877bf9ab8
commit
1493304fc1
3 changed files with 26 additions and 28 deletions
|
|
@ -172,9 +172,6 @@ class StatsControllerTest < ActionController::TestCase
|
|||
|
||||
# only tests difference with actions_done_last_12months_data
|
||||
|
||||
# Then the count of months should be calculated
|
||||
assert_equal 27, assigns['month_count'], "two years and three months of last todo"
|
||||
|
||||
# And the last two months are corrected
|
||||
assert_equal 2/3.0, assigns['actions_done_avg_last_months_array'][23]
|
||||
assert_equal 2/3.0, assigns['actions_done_avg_last_months_array'][24]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue