several fixes to recurring todos and adds some named_scopes

fixes case where unmarking a complete todo which belongs to a recurring pattern results in two todos that both keep on recurring. With this fix a new todo will only be created when there are no active todos left belonging to that recurring pattern

fixes tests that failed because of previous commits

adds some named_scopes, inspired by http://railscasts.com/episodes/108
This commit is contained in:
Reinier Balt 2008-11-28 16:39:50 +01:00
parent bd2b410c7b
commit 4a98ee5669
8 changed files with 55 additions and 31 deletions

View file

@ -223,9 +223,9 @@ class ProjectsControllerTest < TodoContainerControllerTestBase
login_as :admin_user
u = users(:admin_user)
post :actionize, :state => "active", :format => 'js'
assert_equal 1, projects(:gardenclean).position
assert_equal 2, projects(:timemachine).position
assert_equal 3, projects(:moremoney).position
assert_equal 1, projects(:gardenclean).position
assert_equal 2, projects(:moremoney).position
assert_equal 3, projects(:timemachine).position
end
def test_alphabetize_sorts_active_projects_alphabetically