Remove 'project_hidden' state

Compute it using project/context state

Notable change:
todo.hidden? now also returns true if the todo is completed
This commit is contained in:
Carsten Otto 2016-01-24 00:52:23 +01:00
parent 543f49ed8a
commit ed3bca22a4
12 changed files with 66 additions and 106 deletions

View file

@ -216,8 +216,6 @@ class TodoTest < ActiveSupport::TestCase
new_todo = @not_completed1.user.todos.build(description: "test", context: @not_completed1.context, project: project)
new_todo.save!
assert new_todo.active?
# And I update the state of the todo from its project
new_todo.update_state_from_project
# Then the todo should be hidden
assert new_todo.hidden?
end