From fd2f49596c1f59131f19b8962b946357abf21b6e Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Sat, 27 Oct 2018 13:33:40 -0500 Subject: [PATCH] Update test with the proper param structure Fixes the test failure we were seeing here. --- test/controllers/todos_controller_test.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/controllers/todos_controller_test.rb b/test/controllers/todos_controller_test.rb index 1f23616c..df292c15 100644 --- a/test/controllers/todos_controller_test.rb +++ b/test/controllers/todos_controller_test.rb @@ -383,7 +383,14 @@ class TodosControllerTest < ActionController::TestCase assert todo.hidden?, 'todo should be hidden' # clear project from todo: the todo should be unhidden - xhr :post, :update, :id => todo.id, :_source_view => 'todo', "project_name"=>"", "todo"=>{} + post :update, xhr: true, params: { + "id" => todo.id, + "_source_view" => 'todo', + "project_name" => "", + "todo" => { + "id" => todo.id + } + } assert assigns['project_changed'], "the project of the todo should be changed" todo = Todo.find(todo.id) # reload does not seem to work anymore