Update test with the proper param structure

Fixes the test failure we were seeing here.
This commit is contained in:
Matt Rogers 2018-10-27 13:33:40 -05:00
parent 36e59746ea
commit fd2f49596c
No known key found for this signature in database
GPG key ID: 605D017C07EB4316

View file

@ -383,7 +383,14 @@ class TodosControllerTest < ActionController::TestCase
assert todo.hidden?, 'todo should be hidden' assert todo.hidden?, 'todo should be hidden'
# clear project from todo: the todo should be unhidden # 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" assert assigns['project_changed'], "the project of the todo should be changed"
todo = Todo.find(todo.id) # reload does not seem to work anymore todo = Todo.find(todo.id) # reload does not seem to work anymore