diff options
| author | Zack Hobson | 2013-11-22 12:04:02 -0800 | 
|---|---|---|
| committer | Zack Hobson | 2013-11-22 12:04:16 -0800 | 
| commit | 0a7e14eb48525b291aa5715e107b981af99cbe35 (patch) | |
| tree | b0e4c094ee458537a03415aa6ddfc5d0185fca8c /test/command_test.rb | |
| parent | 6f8f7812e896c58cec91fc682528969b58807d41 (diff) | |
| download | hcl-0a7e14eb48525b291aa5715e107b981af99cbe35.tar.bz2 | |
test coverage for timesheet resource and command edge cases
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 | 
