'Start/Stop tracking' on issues#show

This commit is contained in:
Jens Kraemer
2021-10-05 05:27:35 +08:00
parent bd6711a59f
commit 033e1739d2
22 changed files with 375 additions and 28 deletions

View File

@@ -1,7 +1,7 @@
require_relative '../test_helper'
class UserTest < ActiveSupport::TestCase
fixtures :users, :user_preferences
fixtures :users, :user_preferences, :issues
setup do
@user = User.find 1
@@ -18,4 +18,13 @@ class UserTest < ActiveSupport::TestCase
assert @user.timer_running?
end
test "should build time entry for issue" do
i = Issue.find 1
te = @user.todays_time_entry_for i
assert te.new_record?
assert_equal @user, te.user
assert_equal i, te.issue
assert_equal @user.today, te.spent_on
end
end