update gems and fix failures from new aasm

I'm not sure the test failures caused by reload not working are caused by the new aasm, 
perhaps the thread isolation is causing that...
This commit is contained in:
Reinier Balt 2013-04-29 11:53:32 +02:00
parent 93b0a2557c
commit 5ed69fc1a2
7 changed files with 91 additions and 85 deletions

View file

@ -82,8 +82,9 @@ class RecurringTodosControllerTest < ActionController::TestCase
# mark as active
xhr :post, :toggle_check, :id=>1, :_source_view=>""
recurring_todo_1.reload
assert recurring_todo_1.active?
recurring_todo_1 = RecurringTodo.find(1) # reload seems to not work
assert recurring_todo_1.active?, "recurring todo should be active but is #{recurring_todo_1.aasm_current_state}"
# by making active, a new todo should be created from the pattern
assert_equal todo_count+1, Todo.count

View file

@ -365,7 +365,8 @@ class TodosControllerTest < ActionController::TestCase
xhr :post, :update, :id => todo.id, :_source_view => 'todo', "project_name"=>"None", "todo"=>{}
assert assigns['project_changed'], "the project of the todo should be changed"
assert todo.reload().active?, "todo should be active"
todo = Todo.find(todo.id) # reload does not seem to work anymore
assert todo.active?, "todo should be active"
end
def test_change_context_of_todo
@ -708,7 +709,7 @@ class TodosControllerTest < ActionController::TestCase
# mark todo complete
xhr :post, :toggle_check, :id => @todo.id, :_source_view => 'todo'
@todo.reload
@todo = Todo.find(@todo.id) #reload does not seem to work anymore
assert @todo.completed?
# check that there is no active todo