Merge pull request #67 from Popsch/dont_hide_todos_in_contextview

Fix: the context view doesn't show pending or due todos
This commit is contained in:
Reinier Balt 2012-02-24 03:42:21 -08:00
commit 956a88110d
2 changed files with 10 additions and 1 deletions

View file

@ -277,7 +277,7 @@ class ContextsController < ApplicationController
# search manually until I can work out a way to do the same thing using
# not_done_todos acts_as_todo_container method Hides actions in hidden
# projects from context.
@not_done_todos = @context.todos.active(
@not_done_todos = @context.todos.not_completed(
:order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC",
:include => Todo::DEFAULT_INCLUDES)

View file

@ -27,6 +27,15 @@ Feature: Manage the list of contexts
And I follow "@computer"
Then I should be on the context page for "@computer"
Scenario: The context view shows all todos
Given I have a todo "foo" in the context "@bar" which is due tomorrow
Given I have a deferred todo "foo2" in the context "@bar"
Given I have a todo "foo3" in the context "@bar"
When I go to the contexts page
And I follow "@bar"
Then I should be on the context page for "@bar"
And the badge should show 3
@selenium
Scenario: Delete context from context page should update badge
Given I have a context called "@computer"