mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-15 21:55:29 +01:00
Merge branch 'master' into rails4
Conflicts: Gemfile.lock config/routes.rb
This commit is contained in:
commit
4a485558e2
51 changed files with 5475 additions and 5015 deletions
|
|
@ -175,6 +175,9 @@ class RecurringTodoTest < ActiveSupport::TestCase
|
|||
assert_equal @sunday, due_date # june 8th
|
||||
|
||||
due_date = @monthly.get_due_date(@sunday) # june 8th
|
||||
assert_equal Time.zone.local(2008,6,8), due_date # june 8th
|
||||
|
||||
due_date = @monthly.get_due_date(@monday) # june 9th
|
||||
assert_equal Time.zone.local(2008,8,8), due_date # aug 8th
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ class TaggingTest < ActiveSupport::TestCase
|
|||
|
||||
tagging.destroy
|
||||
|
||||
assert_nil Tag.where(:name => "hello").first
|
||||
assert_nil Tag.where(:name => "hello").first, "Tag should be destroyed when last use in tagging was removed"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -239,6 +239,26 @@ class TodoTest < ActiveSupport::TestCase
|
|||
assert !@not_completed1.starred?
|
||||
end
|
||||
|
||||
def test_hidden_todo_remains_hidden_after_getting_unblokked
|
||||
todo = todos(:call_bill)
|
||||
project=todo.project
|
||||
project.hide!
|
||||
|
||||
assert todo.reload.hidden?, "todo in hidden project should be hidden"
|
||||
|
||||
todo2 = todos(:call_dino_ext)
|
||||
todo.add_predecessor(todo2)
|
||||
todo.block!
|
||||
|
||||
assert todo.pending?, "todo with predecessor should be blocked"
|
||||
|
||||
# cannot activate if part of hidden project
|
||||
assert_raise(AASM::InvalidTransition) { todo.activate! }
|
||||
|
||||
todo.remove_predecessor(todo2)
|
||||
assert todo.reload.hidden?, "todo should be put back in hidden state"
|
||||
end
|
||||
|
||||
def test_todo_specification_handles_null_project
|
||||
# @not_completed1 has a project
|
||||
todo_desc = @not_completed1.description
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue