migrating to aasm - code part

This commit is contained in:
Stefan Richter 2011-05-16 15:42:47 +08:00 committed by Reinier Balt
parent 65e3a8ff30
commit 00819ce27b
54 changed files with 2656 additions and 839 deletions

View file

@ -58,7 +58,7 @@ class ProjectsControllerTest < TodoContainerControllerTestBase
login_as(:admin_user)
xhr :post, :update, :id => 1, "project"=>{"name"=>p.name, "description"=>p.description, "state"=>"hidden"}
todos.each do |t|
assert_equal :project_hidden, t.reload().current_state
assert_equal :project_hidden, t.reload().aasm_current_state
end
assert p.reload().hidden?
end
@ -70,7 +70,7 @@ class ProjectsControllerTest < TodoContainerControllerTestBase
xhr :post, :update, :id => 1, "project"=>{"name"=>p.name, "description"=>p.description, "state"=>"hidden"}
xhr :post, :update, :id => 1, "project"=>{"name"=>p.name, "description"=>p.description, "state"=>"active"}
todos.each do |t|
assert_equal :active, t.reload().current_state
assert_equal :active, t.reload().aasm_current_state
end
assert p.reload().active?
end