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

@ -4,9 +4,9 @@ class RecurringTodosTest < ActionDispatch::IntegrationTest
def logs_in_as(user,plain_pass)
@user = user
post "/login", :user_login => @user.login,
post "/login", params: { :user_login => @user.login,
:user_password => plain_pass,
:user_noexpiry => 'n'
:user_noexpiry => 'n' }
assert_response :redirect
follow_redirect!
assert_response :success
@ -22,7 +22,7 @@ class RecurringTodosTest < ActionDispatch::IntegrationTest
# when I toggle the todo complete
todo = Todo.where(:recurring_todo_id => 1).first
put "/todos/#{todo.id}/toggle_check", :_source_view => 'todo'
put "/todos/#{todo.id}/toggle_check", params: { :_source_view => 'todo' }
todo.reload
assert todo.completed?
@ -32,7 +32,8 @@ class RecurringTodosTest < ActionDispatch::IntegrationTest
refute_equal todo2.id, todo.id # and the todos should be different
# when I delete the recurring todo
delete_via_redirect "/recurring_todos/#{rt.id}", :_source_view => 'todo'
delete "/recurring_todos/#{rt.id}", params: { :_source_view => 'todo' }
follow_redirect!
todo.reload
todo2.reload