mirror of
https://github.com/rickbarrette/stopwatch.git
synced 2026-04-02 09:51:57 -04:00
22 lines
393 B
Ruby
22 lines
393 B
Ruby
require_relative '../test_helper'
|
|
|
|
class UserTest < ActiveSupport::TestCase
|
|
fixtures :users, :user_preferences
|
|
|
|
setup do
|
|
@user = User.find 1
|
|
end
|
|
|
|
test "should get inactive timer state" do
|
|
refute @user.timer_running?
|
|
end
|
|
|
|
test "should start timer and get running state" do
|
|
t = Stopwatch::Timer.new @user
|
|
t.start
|
|
t.save
|
|
assert @user.timer_running?
|
|
end
|
|
|
|
end
|