mirror of
https://github.com/rickbarrette/stopwatch.git
synced 2026-04-02 09:51:57 -04:00
initial commit
This commit is contained in:
21
test/unit/user_test.rb
Normal file
21
test/unit/user_test.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
Reference in New Issue
Block a user