mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Fix failing test
As far as I can tell, this is how the test is intended to work, and how it works in v2.2.2. If a recurring todo set to show on the date is completed *on* the specified date, it will create a deferred one for the *next* month.
This commit is contained in:
parent
a6c32889ce
commit
4cd8688d9a
1 changed files with 1 additions and 13 deletions
|
|
@ -729,23 +729,11 @@ class TodosControllerTest < ActionController::TestCase
|
|||
recurring_todo_1.every_other2 = 1
|
||||
assert recurring_todo_1.save
|
||||
|
||||
# mark todo_1 as complete by toggle_check, this gets rid of todo_1 that was
|
||||
# not correctly created from the adjusted recurring pattern we defined
|
||||
# above.
|
||||
# mark todo_1 as complete by toggle_check
|
||||
xhr :post, :toggle_check, :id => todo_1.id, :_source_view => 'todo'
|
||||
todo_1.reload
|
||||
assert todo_1.completed?
|
||||
|
||||
# locate the new todo. This todo is created from the adjusted recurring
|
||||
# pattern defined in this test
|
||||
new_todo = Todo.where(:recurring_todo_id => recurring_todo_1.id, :state => 'active').first
|
||||
assert !new_todo.nil?
|
||||
|
||||
# mark new_todo as complete by toggle_check
|
||||
xhr :post, :toggle_check, :id => new_todo.id, :_source_view => 'todo'
|
||||
new_todo.reload
|
||||
assert todo_1.completed?
|
||||
|
||||
# locate the new todo in tickler
|
||||
new_todo = Todo.where(:recurring_todo_id => recurring_todo_1.id, :state => 'deferred').first
|
||||
assert !new_todo.nil?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue