Use the keyword args syntax for controller actions

Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
This commit is contained in:
Matt Rogers 2018-11-03 11:00:27 -05:00
parent 755a7a1b80
commit 2f85a42f91
No known key found for this signature in database
GPG key ID: 605D017C07EB4316
19 changed files with 258 additions and 241 deletions

View file

@ -69,22 +69,22 @@ class StatsControllerTest < ActionController::TestCase
# assert_template nil
# get week 0-1 for actions visible running
get :show_selected_actions_from_chart, :id => 'avrt', :index => 0
get :show_selected_actions_from_chart, params: { :id => 'avrt', :index => 0 }
assert_response :success
assert_template "stats/show_selection_from_chart"
# get week 0 and further for actions visible running
get :show_selected_actions_from_chart, :id => 'avrt_end', :index => 0
get :show_selected_actions_from_chart, params: { :id => 'avrt_end', :index => 0 }
assert_response :success
assert_template "stats/show_selection_from_chart"
# get week 0-1 for actions running
get :show_selected_actions_from_chart, :id => 'art', :index => 0
get :show_selected_actions_from_chart, params: { :id => 'art', :index => 0 }
assert_response :success
assert_template "stats/show_selection_from_chart"
# get week 0 and further for actions running
get :show_selected_actions_from_chart, :id => 'art_end', :index => 0
get :show_selected_actions_from_chart, params: { :id => 'art_end', :index => 0 }
assert_response :success
assert_template "stats/show_selection_from_chart"
end
@ -404,7 +404,7 @@ class StatsControllerTest < ActionController::TestCase
given_todos_for_stats
# When I get the chart data
get :show_selected_actions_from_chart, {:id => "avrt", :index => 1}
get :show_selected_actions_from_chart, params: {:id => "avrt", :index => 1}
assert_response :success
assert_equal false, assigns['further'] # not at end
@ -419,7 +419,7 @@ class StatsControllerTest < ActionController::TestCase
given_todos_for_stats
# When I get the chart data
get :show_selected_actions_from_chart, {:id => "avrt_end", :index => 1}
get :show_selected_actions_from_chart, params: {:id => "avrt_end", :index => 1}
assert_response :success
assert assigns['further'] # at end
@ -434,7 +434,7 @@ class StatsControllerTest < ActionController::TestCase
given_todos_for_stats
# When I get the chart data
get :show_selected_actions_from_chart, {:id => "art", :index => 1}
get :show_selected_actions_from_chart, params: {:id => "art", :index => 1}
assert_response :success
assert_equal false, assigns['further'] # not at end
@ -449,7 +449,7 @@ class StatsControllerTest < ActionController::TestCase
given_todos_for_stats
# When I get the chart data
get :show_selected_actions_from_chart, {:id => "art_end", :index => 1}
get :show_selected_actions_from_chart, params: {:id => "art_end", :index => 1}
assert_response :success
assert assigns['further'] # at end