summaryrefslogtreecommitdiffstats
path: root/test/command_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/command_test.rb')
-rw-r--r--test/command_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/command_test.rb b/test/command_test.rb
index e3f9806..69bad62 100644
--- a/test/command_test.rb
+++ b/test/command_test.rb
@@ -81,6 +81,15 @@ class CommandTest < HCl::TestCase
stop 'all done'
end
+ def test_yesterday
+ entry = stub
+ register_uri(:get, '/daily', {day_entries:[]})
+ register_uri(:get, '/daily/026/2014', {day_entries:[{id:321,notes:'',hours:1,client:nil,project:nil,timer_started_at:DateTime.now}]})
+ register_uri(:post, '/daily/update/321', {day_entry:{notes:'all done next day'}})
+ register_uri(:get, '/daily/timer/321')
+ stop 'all done next day'
+ end
+
def test_resume
entry = stub
HCl::DayEntry.expects(:last).returns(entry)