mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Update test with the proper param structure
Fixes the test failure we were seeing here.
This commit is contained in:
parent
36e59746ea
commit
fd2f49596c
1 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue