show currently running timer in window title, menu item

This commit is contained in:
Jens Kraemer
2020-04-25 17:09:38 +08:00
parent 797e40384a
commit 30bcd5ff8c
7 changed files with 146 additions and 22 deletions

View File

@@ -33,6 +33,16 @@ class TimerTest < ActiveSupport::TestCase
assert_equal hours + 1, @time_entry.hours
end
test "should update time entry" do
hours = @time_entry.hours
@timer.start @time_entry
@data[:started_at] = 1.hour.ago.to_i
@timer.update
@time_entry.reload
assert_equal hours + 1, @time_entry.hours
end
test "should save and restore" do
hours = @time_entry.hours
@timer.start @time_entry