diff options
Diffstat (limited to 'test/command_test.rb')
| -rw-r--r-- | test/command_test.rb | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/test/command_test.rb b/test/command_test.rb index 5a2e003..b425974 100644 --- a/test/command_test.rb +++ b/test/command_test.rb @@ -82,6 +82,14 @@ class CommandTest < Test::Unit::TestCase      resume    end +  def test_resume_with_task_alias +    entry = stub +    expects(:get_task_ids).with('mytask',[]).returns(%w[ 456 789 ]) +    HCl::DayEntry.expects(:last_by_task).with('456', '789').returns(entry) +    entry.expects(:toggle) +    resume 'mytask' +  end +    def test_cancel      entry = stub      HCl::DayEntry.expects(:with_timer).returns(entry) @@ -96,4 +104,10 @@ class CommandTest < Test::Unit::TestCase      note 'hi world'    end +  def test_note_display +    entry = stub(notes:"your face") +    HCl::DayEntry.expects(:with_timer).returns(entry) +    assert_equal "your face", note +  end +  end | 
