summaryrefslogtreecommitdiffstats
path: root/test/command_test.rb
diff options
context:
space:
mode:
authorZack Hobson2014-01-26 10:07:28 -0800
committerZack Hobson2014-01-26 10:11:32 -0800
commit300ff2b3e1ccd190f361f47ef2eb640d7e141073 (patch)
tree79590120cf1b1689a0572e0d68be2a9a06008806 /test/command_test.rb
parentd95054ddf4fd4d2152d213d7a1391831f9540d0b (diff)
downloadhcl-300ff2b3e1ccd190f361f47ef2eb640d7e141073.tar.bz2
confirm timer cancel, closes #47
Diffstat (limited to 'test/command_test.rb')
-rw-r--r--test/command_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/command_test.rb b/test/command_test.rb
index 2e2812f..e3f9806 100644
--- a/test/command_test.rb
+++ b/test/command_test.rb
@@ -100,6 +100,14 @@ class CommandTest < HCl::TestCase
entry = stub
HCl::DayEntry.expects(:with_timer).with(http).returns(entry)
entry.expects(:cancel).with(http).returns(true)
+ expects(:ask).returns('y')
+ cancel
+ end
+
+ def test_cancel_no
+ entry = stub
+ HCl::DayEntry.expects(:with_timer).with(http).returns(entry)
+ expects(:ask).returns('n')
cancel
end