mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-17 22:55:28 +01:00
Shifting more instance variables to the controller
Also removing some instance variables that were never invoked in the views. This sets up a future refactoring of the method of comptuting rolling averages, which differs between the two types of "last year" views being refactored.
This commit is contained in:
parent
1493304fc1
commit
70f633c150
3 changed files with 24 additions and 23 deletions
|
|
@ -109,9 +109,9 @@ class StatsControllerTest < ActionController::TestCase
|
|||
assert_response :success
|
||||
|
||||
# Then the todos for the chart should be retrieved
|
||||
assert_not_nil assigns['actions_done_last12months']
|
||||
assert_not_nil assigns['actions_created_last12months']
|
||||
assert_equal 7, assigns['actions_created_last12months'].count, "very old todo should not be retrieved"
|
||||
#assert_not_nil assigns['actions_done_last12months']
|
||||
#assert_not_nil assigns['actions_created_last12months']
|
||||
#assert_equal 7, assigns['actions_created_last12months'].count, "very old todo should not be retrieved"
|
||||
|
||||
# And they should be totalled in a hash
|
||||
assert_equal 2, assigns['actions_created_last12months_array'][0], "there should be two todos in current month"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue