summaryrefslogtreecommitdiffstats
path: root/test/command_test.rb
diff options
context:
space:
mode:
authorZack Hobson2014-01-29 10:06:51 -0800
committerZack Hobson2014-01-29 10:06:51 -0800
commit20556078f1614b57cf331884a6f346fec4579d4b (patch)
tree4a18c7bffc3f419445354fcb58570b581a52465f /test/command_test.rb
parentf90a24b91f8abfab2201b949ca190794274b393c (diff)
downloadhcl-20556078f1614b57cf331884a6f346fec4579d4b.tar.bz2
command_test: fix stop yesterday test
Diffstat (limited to 'test/command_test.rb')
-rw-r--r--test/command_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/command_test.rb b/test/command_test.rb
index 69bad62..899e327 100644
--- a/test/command_test.rb
+++ b/test/command_test.rb
@@ -81,10 +81,11 @@ class CommandTest < HCl::TestCase
stop 'all done'
end
- def test_yesterday
+ def test_stop_yesterday
entry = stub
+ yesterday = (DateTime.now - 1).strftime("%3j")
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(:get, "/daily/#{yesterday}/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'