mirror of
https://github.com/rickbarrette/stopwatch.git
synced 2026-04-02 09:51:57 -04:00
'Start/Stop tracking' on issues#show
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user