{"action":"created","comment":{"url":"https://api.github.com/repos/collectiveidea/hourglass/pulls/comments/37022100","id":37022100,"diff_hunk":"@@ -54,4 +65,90 @@\n       it { is_expected.not_to accept_values_for(:time_zone, nil, \"Foo Bar\") }\n     end\n   end\n+\n+  describe \".for_timer_reminder\" do\n+    let(:date) { Date.parse(\"Monday\") }\n+\n+    before do\n+      @user = create(:user, workdays: %w(1 2))\n+      @other_user = create(:user, workdays: %w(4))\n+      day = create(:day, date: date, user: @user, client_hours: 0,\n+                   internal_hours: 0, pto: false,\n+                   timer_reminder_sent: false, workday: true)\n+    end\n+\n+    it \"includes users that work that day and haven't started a timer\" do\n+      expect(User.for_timer_reminder(date: date)).to include(@user)\n+    end\n+\n+    it \"doesn't include other users\" do\n+      expect(User.for_timer_reminder(date: date)).not_to include(@other_user)\n+    end\n+  end\n+\n+  describe \"#timer_reminder_sent!\" do\n+    before do\n+      @user = create(:user)\n+      @tomorrow_day = create(:day, date: Date.tomorrow, user: @user)\n+      @today_day = create(:day, date: Date.current, user: @user)\n+    end\n+\n+    it \"sets the day's timer_reminder_sent to true when date passed\" do\n+      @user.timer_reminder_sent!(date: Date.tomorrow)\n+      @tomorrow_day.reload\n+\n+      expect(@tomorrow_day.timer_reminder_sent).to eq(true)\n+    end\n+\n+    it \"sets today's timer_reminder_sent to true when no date passed\" do\n+      @user.timer_reminder_sent!\n+      @today_day.reload\n+\n+      expect(@today_day.timer_reminder_sent).to eq(true)\n+    end","path":"spec/models/user_spec.rb","position":62,"original_position":62,"commit_id":"318f4ca62746e8b48bd878ee92cc2c586e61a1fc","original_commit_id":"318f4ca62746e8b48bd878ee92cc2c586e61a1fc","user":{"login":"danabrit","id":29824,"avatar_url":"https://avatars.githubusercontent.com/u/29824?v=3","gravatar_id":"","url":"https://api.github.com/users/danabrit","html_url":"https://github.com/danabrit","followers_url":"https://api.github.com/users/danabrit/followers","following_url":"https://api.github.com/users/danabrit/following{/other_user}","gists_url":"https://api.github.com/users/danabrit/gists{/gist_id}","starred_url":"https://api.github.com/users/danabrit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danabrit/subscriptions","organizations_url":"https://api.github.com/users/danabrit/orgs","repos_url":"https://api.github.com/users/danabrit/repos","events_url":"https://api.github.com/users/danabrit/events{/privacy}","received_events_url":"https://api.github.com/users/danabrit/received_events","type":"User","site_admin":false},"body":"Yes, please.","created_at":"2015-08-13T20:36:15Z","updated_at":"2015-08-13T20:36:15Z","html_url":"https://github.com/collectiveidea/hourglass/pull/22#discussion_r37022100","pull_request_url":"https://api.github.com/repos/collectiveidea/hourglass/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/collectiveidea/hourglass/pulls/comments/37022100"},"html":{"href":"https://github.com/collectiveidea/hourglass/pull/22#discussion_r37022100"},"pull_request":{"href":"https://api.github.com/repos/collectiveidea/hourglass/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/collectiveidea/hourglass/pulls/22","id":42382182,"html_url":"https://github.com/collectiveidea/hourglass/pull/22","diff_url":"https://github.com/collectiveidea/hourglass/pull/22.diff","patch_url":"https://github.com/collectiveidea/hourglass/pull/22.patch","issue_url":"https://api.github.com/repos/collectiveidea/hourglass/issues/22","number":22,"state":"open","locked":false,"title":"Unit Tests","user":{"login":"danabrit","id":29824,"avatar_url":"https://avatars.githubusercontent.com/u/29824?v=3","gravatar_id":"","url":"https://api.github.com/users/danabrit","html_url":"https://github.com/danabrit","followers_url":"https://api.github.com/users/danabrit/followers","following_url":"https://api.github.com/users/danabrit/following{/other_user}","gists_url":"https://api.github.com/users/danabrit/gists{/gist_id}","starred_url":"https://api.github.com/users/danabrit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danabrit/subscriptions","organizations_url":"https://api.github.com/users/danabrit/orgs","repos_url":"https://api.github.com/users/danabrit/repos","events_url":"https://api.github.com/users/danabrit/events{/privacy}","received_events_url":"https://api.github.com/users/danabrit/received_events","type":"User","site_admin":false},"body":"This PR includes some unit testing for the User model beyond the validations.","created_at":"2015-08-13T18:23:29Z","updated_at":"2015-08-13T20:36:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17a9616f715cf1c0ad980a3830b381c07368f406","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/collectiveidea/hourglass/pulls/22/commits","review_comments_url":"https://api.github.com/repos/collectiveidea/hourglass/pulls/22/comments","review_comment_url":"https://api.github.com/repos/collectiveidea/hourglass/pulls/comments{/number}","comments_url":"https://api.github.com/repos/collectiveidea/hourglass/issues/22/comments","statuses_url":"https://api.github.com/repos/collectiveidea/hourglass/statuses/318f4ca62746e8b48bd878ee92cc2c586e61a1fc","head":{"label":"collectiveidea:dana","ref":"dana","sha":"318f4ca62746e8b48bd878ee92cc2c586e61a1fc","user":{"login":"collectiveidea","id":128,"avatar_url":"https://avatars.githubusercontent.com/u/128?v=3","gravatar_id":"","url":"https://api.github.com/users/collectiveidea","html_url":"https://github.com/collectiveidea","followers_url":"https://api.github.com/users/collectiveidea/followers","following_url":"https://api.github.com/users/collectiveidea/following{/other_user}","gists_url":"https://api.github.com/users/collectiveidea/gists{/gist_id}","starred_url":"https://api.github.com/users/collectiveidea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collectiveidea/subscriptions","organizations_url":"https://api.github.com/users/collectiveidea/orgs","repos_url":"https://api.github.com/users/collectiveidea/repos","events_url":"https://api.github.com/users/collectiveidea/events{/privacy}","received_events_url":"https://api.github.com/users/collectiveidea/received_events","type":"Organization","site_admin":false},"repo":{"id":13967112,"name":"hourglass","full_name":"collectiveidea/hourglass","owner":{"login":"collectiveidea","id":128,"avatar_url":"https://avatars.githubusercontent.com/u/128?v=3","gravatar_id":"","url":"https://api.github.com/users/collectiveidea","html_url":"https://github.com/collectiveidea","followers_url":"https://api.github.com/users/collectiveidea/followers","following_url":"https://api.github.com/users/collectiveidea/following{/other_user}","gists_url":"https://api.github.com/users/collectiveidea/gists{/gist_id}","starred_url":"https://api.github.com/users/collectiveidea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collectiveidea/subscriptions","organizations_url":"https://api.github.com/users/collectiveidea/orgs","repos_url":"https://api.github.com/users/collectiveidea/repos","events_url":"https://api.github.com/users/collectiveidea/events{/privacy}","received_events_url":"https://api.github.com/users/collectiveidea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/collectiveidea/hourglass","description":"Client and internal time management with Harvest","fork":false,"url":"https://api.github.com/repos/collectiveidea/hourglass","forks_url":"https://api.github.com/repos/collectiveidea/hourglass/forks","keys_url":"https://api.github.com/repos/collectiveidea/hourglass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/collectiveidea/hourglass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/collectiveidea/hourglass/teams","hooks_url":"https://api.github.com/repos/collectiveidea/hourglass/hooks","issue_events_url":"https://api.github.com/repos/collectiveidea/hourglass/issues/events{/number}","events_url":"https://api.github.com/repos/collectiveidea/hourglass/events","assignees_url":"https://api.github.com/repos/collectiveidea/hourglass/assignees{/user}","branches_url":"https://api.github.com/repos/collectiveidea/hourglass/branches{/branch}","tags_url":"https://api.github.com/repos/collectiveidea/hourglass/tags","blobs_url":"https://api.github.com/repos/collectiveidea/hourglass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/collectiveidea/hourglass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/collectiveidea/hourglass/git/refs{/sha}","trees_url":"https://api.github.com/repos/collectiveidea/hourglass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/collectiveidea/hourglass/statuses/{sha}","languages_url":"https://api.github.com/repos/collectiveidea/hourglass/languages","stargazers_url":"https://api.github.com/repos/collectiveidea/hourglass/stargazers","contributors_url":"https://api.github.com/repos/collectiveidea/hourglass/contributors","subscribers_url":"https://api.github.com/repos/collectiveidea/hourglass/subscribers","subscription_url":"https://api.github.com/repos/collectiveidea/hourglass/subscription","commits_url":"https://api.github.com/repos/collectiveidea/hourglass/commits{/sha}","git_commits_url":"https://api.github.com/repos/collectiveidea/hourglass/git/commits{/sha}","comments_url":"https://api.github.com/repos/collectiveidea/hourglass/comments{/number}","issue_comment_url":"https://api.github.com/repos/collectiveidea/hourglass/issues/comments{/number}","contents_url":"https://api.github.com/repos/collectiveidea/hourglass/contents/{+path}","compare_url":"https://api.github.com/repos/collectiveidea/hourglass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/collectiveidea/hourglass/merges","archive_url":"https://api.github.com/repos/collectiveidea/hourglass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/collectiveidea/hourglass/downloads","issues_url":"https://api.github.com/repos/collectiveidea/hourglass/issues{/number}","pulls_url":"https://api.github.com/repos/collectiveidea/hourglass/pulls{/number}","milestones_url":"https://api.github.com/repos/collectiveidea/hourglass/milestones{/number}","notifications_url":"https://api.github.com/repos/collectiveidea/hourglass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/collectiveidea/hourglass/labels{/name}","releases_url":"https://api.github.com/repos/collectiveidea/hourglass/releases{/id}","created_at":"2013-10-29T20:04:01Z","updated_at":"2015-05-08T17:31:53Z","pushed_at":"2015-08-13T20:24:54Z","git_url":"git://github.com/collectiveidea/hourglass.git","ssh_url":"git@github.com:collectiveidea/hourglass.git","clone_url":"https://github.com/collectiveidea/hourglass.git","svn_url":"https://github.com/collectiveidea/hourglass","homepage":"hourglass.collectiveidea.com","size":690,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"collectiveidea:master","ref":"master","sha":"7dc775dd2acaac87fb678bd8e01f357365b5dfd3","user":{"login":"collectiveidea","id":128,"avatar_url":"https://avatars.githubusercontent.com/u/128?v=3","gravatar_id":"","url":"https://api.github.com/users/collectiveidea","html_url":"https://github.com/collectiveidea","followers_url":"https://api.github.com/users/collectiveidea/followers","following_url":"https://api.github.com/users/collectiveidea/following{/other_user}","gists_url":"https://api.github.com/users/collectiveidea/gists{/gist_id}","starred_url":"https://api.github.com/users/collectiveidea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collectiveidea/subscriptions","organizations_url":"https://api.github.com/users/collectiveidea/orgs","repos_url":"https://api.github.com/users/collectiveidea/repos","events_url":"https://api.github.com/users/collectiveidea/events{/privacy}","received_events_url":"https://api.github.com/users/collectiveidea/received_events","type":"Organization","site_admin":false},"repo":{"id":13967112,"name":"hourglass","full_name":"collectiveidea/hourglass","owner":{"login":"collectiveidea","id":128,"avatar_url":"https://avatars.githubusercontent.com/u/128?v=3","gravatar_id":"","url":"https://api.github.com/users/collectiveidea","html_url":"https://github.com/collectiveidea","followers_url":"https://api.github.com/users/collectiveidea/followers","following_url":"https://api.github.com/users/collectiveidea/following{/other_user}","gists_url":"https://api.github.com/users/collectiveidea/gists{/gist_id}","starred_url":"https://api.github.com/users/collectiveidea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collectiveidea/subscriptions","organizations_url":"https://api.github.com/users/collectiveidea/orgs","repos_url":"https://api.github.com/users/collectiveidea/repos","events_url":"https://api.github.com/users/collectiveidea/events{/privacy}","received_events_url":"https://api.github.com/users/collectiveidea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/collectiveidea/hourglass","description":"Client and internal time management with Harvest","fork":false,"url":"https://api.github.com/repos/collectiveidea/hourglass","forks_url":"https://api.github.com/repos/collectiveidea/hourglass/forks","keys_url":"https://api.github.com/repos/collectiveidea/hourglass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/collectiveidea/hourglass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/collectiveidea/hourglass/teams","hooks_url":"https://api.github.com/repos/collectiveidea/hourglass/hooks","issue_events_url":"https://api.github.com/repos/collectiveidea/hourglass/issues/events{/number}","events_url":"https://api.github.com/repos/collectiveidea/hourglass/events","assignees_url":"https://api.github.com/repos/collectiveidea/hourglass/assignees{/user}","branches_url":"https://api.github.com/repos/collectiveidea/hourglass/branches{/branch}","tags_url":"https://api.github.com/repos/collectiveidea/hourglass/tags","blobs_url":"https://api.github.com/repos/collectiveidea/hourglass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/collectiveidea/hourglass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/collectiveidea/hourglass/git/refs{/sha}","trees_url":"https://api.github.com/repos/collectiveidea/hourglass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/collectiveidea/hourglass/statuses/{sha}","languages_url":"https://api.github.com/repos/collectiveidea/hourglass/languages","stargazers_url":"https://api.github.com/repos/collectiveidea/hourglass/stargazers","contributors_url":"https://api.github.com/repos/collectiveidea/hourglass/contributors","subscribers_url":"https://api.github.com/repos/collectiveidea/hourglass/subscribers","subscription_url":"https://api.github.com/repos/collectiveidea/hourglass/subscription","commits_url":"https://api.github.com/repos/collectiveidea/hourglass/commits{/sha}","git_commits_url":"https://api.github.com/repos/collectiveidea/hourglass/git/commits{/sha}","comments_url":"https://api.github.com/repos/collectiveidea/hourglass/comments{/number}","issue_comment_url":"https://api.github.com/repos/collectiveidea/hourglass/issues/comments{/number}","contents_url":"https://api.github.com/repos/collectiveidea/hourglass/contents/{+path}","compare_url":"https://api.github.com/repos/collectiveidea/hourglass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/collectiveidea/hourglass/merges","archive_url":"https://api.github.com/repos/collectiveidea/hourglass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/collectiveidea/hourglass/downloads","issues_url":"https://api.github.com/repos/collectiveidea/hourglass/issues{/number}","pulls_url":"https://api.github.com/repos/collectiveidea/hourglass/pulls{/number}","milestones_url":"https://api.github.com/repos/collectiveidea/hourglass/milestones{/number}","notifications_url":"https://api.github.com/repos/collectiveidea/hourglass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/collectiveidea/hourglass/labels{/name}","releases_url":"https://api.github.com/repos/collectiveidea/hourglass/releases{/id}","created_at":"2013-10-29T20:04:01Z","updated_at":"2015-05-08T17:31:53Z","pushed_at":"2015-08-13T20:24:54Z","git_url":"git://github.com/collectiveidea/hourglass.git","ssh_url":"git@github.com:collectiveidea/hourglass.git","clone_url":"https://github.com/collectiveidea/hourglass.git","svn_url":"https://github.com/collectiveidea/hourglass","homepage":"hourglass.collectiveidea.com","size":690,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/collectiveidea/hourglass/pulls/22"},"html":{"href":"https://github.com/collectiveidea/hourglass/pull/22"},"issue":{"href":"https://api.github.com/repos/collectiveidea/hourglass/issues/22"},"comments":{"href":"https://api.github.com/repos/collectiveidea/hourglass/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/collectiveidea/hourglass/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/collectiveidea/hourglass/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/collectiveidea/hourglass/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/collectiveidea/hourglass/statuses/318f4ca62746e8b48bd878ee92cc2c586e61a1fc"}}}}