{"action":"created","comment":{"url":"https://api.github.com/repos/umts/jobapps/pulls/comments/81588097","pull_request_review_id":2554742,"id":81588097,"diff_hunk":"@@ -184,6 +184,81 @@\n     end\n   end\n \n+  describe 'save_for_later' do\n+    let :record do\n+      create :application_record,\n+             saved_for_later: false\n+    end\n+    it 'updates the saved for later attribute to true' do\n+      record.save_for_later\n+      expect(record.saved_for_later).to be_truthy\n+    end\n+    context 'mail to applicant desired' do\n+      let(:mail) do\n+        ActionMailer::MessageDelivery.new(JobappsMailer, :send_note_for_later)\n+      end\n+      it 'calls the mailer method' do\n+        expect(JobappsMailer)\n+          .to receive(:send_note_for_later)\n+          .with(record)\n+          .and_return mail\n+        expect(mail).to receive(:deliver_now).and_return true\n+        record.save_for_later(nil, nil, true)\n+      end\n+    end\n+    context 'mail to applicant not desired' do\n+      it 'does not call the mailer method' do\n+        expect(JobappsMailer).not_to receive(:send_note_for_later)\n+        record.save_for_later(nil, nil, false)\n+      end\n+    end\n+  end\n+\n+  describe 'unsave' do\n+    let(:record) do","path":"spec/models/application_record_spec.rb","position":35,"original_position":35,"commit_id":"91bda4a7a3073db7853961fde3d731a9387f6989","original_commit_id":"91bda4a7a3073db7853961fde3d731a9387f6989","user":{"login":"dfaulken","id":3988134,"avatar_url":"https://avatars.githubusercontent.com/u/3988134?v=3","gravatar_id":"","url":"https://api.github.com/users/dfaulken","html_url":"https://github.com/dfaulken","followers_url":"https://api.github.com/users/dfaulken/followers","following_url":"https://api.github.com/users/dfaulken/following{/other_user}","gists_url":"https://api.github.com/users/dfaulken/gists{/gist_id}","starred_url":"https://api.github.com/users/dfaulken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfaulken/subscriptions","organizations_url":"https://api.github.com/users/dfaulken/orgs","repos_url":"https://api.github.com/users/dfaulken/repos","events_url":"https://api.github.com/users/dfaulken/events{/privacy}","received_events_url":"https://api.github.com/users/dfaulken/received_events","type":"User","site_admin":false},"body":"You alternate a fair bit in this PR between\r\n\r\n```ruby\r\nlet :record do\r\n```\r\n\r\nand \r\n\r\n```ruby\r\nlet(:record) do\r\n```\r\n\r\nIt'd be good to be consistent.","created_at":"2016-10-03T16:36:31Z","updated_at":"2016-10-03T16:36:42Z","html_url":"https://github.com/umts/jobapps/pull/270#discussion_r81588097","pull_request_url":"https://api.github.com/repos/umts/jobapps/pulls/270","_links":{"self":{"href":"https://api.github.com/repos/umts/jobapps/pulls/comments/81588097"},"html":{"href":"https://github.com/umts/jobapps/pull/270#discussion_r81588097"},"pull_request":{"href":"https://api.github.com/repos/umts/jobapps/pulls/270"}}},"pull_request":{"url":"https://api.github.com/repos/umts/jobapps/pulls/270","id":86998842,"html_url":"https://github.com/umts/jobapps/pull/270","diff_url":"https://github.com/umts/jobapps/pull/270.diff","patch_url":"https://github.com/umts/jobapps/pull/270.patch","issue_url":"https://api.github.com/repos/umts/jobapps/issues/270","number":270,"state":"open","locked":false,"title":"Saved for later","user":{"login":"Anbranin","id":9645316,"avatar_url":"https://avatars.githubusercontent.com/u/9645316?v=3","gravatar_id":"","url":"https://api.github.com/users/Anbranin","html_url":"https://github.com/Anbranin","followers_url":"https://api.github.com/users/Anbranin/followers","following_url":"https://api.github.com/users/Anbranin/following{/other_user}","gists_url":"https://api.github.com/users/Anbranin/gists{/gist_id}","starred_url":"https://api.github.com/users/Anbranin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anbranin/subscriptions","organizations_url":"https://api.github.com/users/Anbranin/orgs","repos_url":"https://api.github.com/users/Anbranin/repos","events_url":"https://api.github.com/users/Anbranin/events{/privacy}","received_events_url":"https://api.github.com/users/Anbranin/received_events","type":"User","site_admin":false},"body":"@bgregg started this, I finished it.\r\n\r\nYou can now save an application for later review:\r\n![screen shot 2016-09-27 at 3 44 40 pm](https://cloud.githubusercontent.com/assets/9645316/18889080/55cb6750-84c9-11e6-9519-f80ce73c1875.png)\r\nIf you click the box that says \"email to applicant\" the note will get emailed to the applicant. \r\nSelecting a date does this: A cron job runs every 1.day to move any records with an expired date_for_later back onto the dashboard.\r\nLink to view the saved applications here:\r\n![screen shot 2016-09-27 at 3 45 22 pm](https://cloud.githubusercontent.com/assets/9645316/18889112/6a260c64-84c9-11e6-9354-def332e20771.png)\r\nWhich goes to here:\r\n![screen shot 2016-09-27 at 3 45 57 pm](https://cloud.githubusercontent.com/assets/9645316/18889136/85f94f14-84c9-11e6-9fcd-4ba9b43160b8.png)\r\nThere's also a button to move the record back to the dashboard if you wish.","created_at":"2016-09-27T19:48:28Z","updated_at":"2016-10-03T16:36:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"53a62cce3b64f17129d821b36cd84e3f75281aa3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/umts/jobapps/pulls/270/commits","review_comments_url":"https://api.github.com/repos/umts/jobapps/pulls/270/comments","review_comment_url":"https://api.github.com/repos/umts/jobapps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/umts/jobapps/issues/270/comments","statuses_url":"https://api.github.com/repos/umts/jobapps/statuses/91bda4a7a3073db7853961fde3d731a9387f6989","head":{"label":"umts:saved_for_later","ref":"saved_for_later","sha":"91bda4a7a3073db7853961fde3d731a9387f6989","user":{"login":"umts","id":398175,"avatar_url":"https://avatars.githubusercontent.com/u/398175?v=3","gravatar_id":"","url":"https://api.github.com/users/umts","html_url":"https://github.com/umts","followers_url":"https://api.github.com/users/umts/followers","following_url":"https://api.github.com/users/umts/following{/other_user}","gists_url":"https://api.github.com/users/umts/gists{/gist_id}","starred_url":"https://api.github.com/users/umts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umts/subscriptions","organizations_url":"https://api.github.com/users/umts/orgs","repos_url":"https://api.github.com/users/umts/repos","events_url":"https://api.github.com/users/umts/events{/privacy}","received_events_url":"https://api.github.com/users/umts/received_events","type":"Organization","site_admin":false},"repo":{"id":35909798,"name":"jobapps","full_name":"umts/jobapps","owner":{"login":"umts","id":398175,"avatar_url":"https://avatars.githubusercontent.com/u/398175?v=3","gravatar_id":"","url":"https://api.github.com/users/umts","html_url":"https://github.com/umts","followers_url":"https://api.github.com/users/umts/followers","following_url":"https://api.github.com/users/umts/following{/other_user}","gists_url":"https://api.github.com/users/umts/gists{/gist_id}","starred_url":"https://api.github.com/users/umts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umts/subscriptions","organizations_url":"https://api.github.com/users/umts/orgs","repos_url":"https://api.github.com/users/umts/repos","events_url":"https://api.github.com/users/umts/events{/privacy}","received_events_url":"https://api.github.com/users/umts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/umts/jobapps","description":"Barebones Rails 4 app for job application, interview scheduling, demographic reporting, and application resource configuration.","fork":false,"url":"https://api.github.com/repos/umts/jobapps","forks_url":"https://api.github.com/repos/umts/jobapps/forks","keys_url":"https://api.github.com/repos/umts/jobapps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/umts/jobapps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/umts/jobapps/teams","hooks_url":"https://api.github.com/repos/umts/jobapps/hooks","issue_events_url":"https://api.github.com/repos/umts/jobapps/issues/events{/number}","events_url":"https://api.github.com/repos/umts/jobapps/events","assignees_url":"https://api.github.com/repos/umts/jobapps/assignees{/user}","branches_url":"https://api.github.com/repos/umts/jobapps/branches{/branch}","tags_url":"https://api.github.com/repos/umts/jobapps/tags","blobs_url":"https://api.github.com/repos/umts/jobapps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/umts/jobapps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/umts/jobapps/git/refs{/sha}","trees_url":"https://api.github.com/repos/umts/jobapps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/umts/jobapps/statuses/{sha}","languages_url":"https://api.github.com/repos/umts/jobapps/languages","stargazers_url":"https://api.github.com/repos/umts/jobapps/stargazers","contributors_url":"https://api.github.com/repos/umts/jobapps/contributors","subscribers_url":"https://api.github.com/repos/umts/jobapps/subscribers","subscription_url":"https://api.github.com/repos/umts/jobapps/subscription","commits_url":"https://api.github.com/repos/umts/jobapps/commits{/sha}","git_commits_url":"https://api.github.com/repos/umts/jobapps/git/commits{/sha}","comments_url":"https://api.github.com/repos/umts/jobapps/comments{/number}","issue_comment_url":"https://api.github.com/repos/umts/jobapps/issues/comments{/number}","contents_url":"https://api.github.com/repos/umts/jobapps/contents/{+path}","compare_url":"https://api.github.com/repos/umts/jobapps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/umts/jobapps/merges","archive_url":"https://api.github.com/repos/umts/jobapps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/umts/jobapps/downloads","issues_url":"https://api.github.com/repos/umts/jobapps/issues{/number}","pulls_url":"https://api.github.com/repos/umts/jobapps/pulls{/number}","milestones_url":"https://api.github.com/repos/umts/jobapps/milestones{/number}","notifications_url":"https://api.github.com/repos/umts/jobapps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/umts/jobapps/labels{/name}","releases_url":"https://api.github.com/repos/umts/jobapps/releases{/id}","deployments_url":"https://api.github.com/repos/umts/jobapps/deployments","created_at":"2015-05-19T21:34:57Z","updated_at":"2016-07-05T16:12:35Z","pushed_at":"2016-10-03T16:03:50Z","git_url":"git://github.com/umts/jobapps.git","ssh_url":"git@github.com:umts/jobapps.git","clone_url":"https://github.com/umts/jobapps.git","svn_url":"https://github.com/umts/jobapps","homepage":"https://transit-jobapps.admin.umass.edu","size":1792,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":8,"forks":7,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"umts:master","ref":"master","sha":"c9bf4cb23b5a3560c67ac8661485c60ff2c800fb","user":{"login":"umts","id":398175,"avatar_url":"https://avatars.githubusercontent.com/u/398175?v=3","gravatar_id":"","url":"https://api.github.com/users/umts","html_url":"https://github.com/umts","followers_url":"https://api.github.com/users/umts/followers","following_url":"https://api.github.com/users/umts/following{/other_user}","gists_url":"https://api.github.com/users/umts/gists{/gist_id}","starred_url":"https://api.github.com/users/umts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umts/subscriptions","organizations_url":"https://api.github.com/users/umts/orgs","repos_url":"https://api.github.com/users/umts/repos","events_url":"https://api.github.com/users/umts/events{/privacy}","received_events_url":"https://api.github.com/users/umts/received_events","type":"Organization","site_admin":false},"repo":{"id":35909798,"name":"jobapps","full_name":"umts/jobapps","owner":{"login":"umts","id":398175,"avatar_url":"https://avatars.githubusercontent.com/u/398175?v=3","gravatar_id":"","url":"https://api.github.com/users/umts","html_url":"https://github.com/umts","followers_url":"https://api.github.com/users/umts/followers","following_url":"https://api.github.com/users/umts/following{/other_user}","gists_url":"https://api.github.com/users/umts/gists{/gist_id}","starred_url":"https://api.github.com/users/umts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umts/subscriptions","organizations_url":"https://api.github.com/users/umts/orgs","repos_url":"https://api.github.com/users/umts/repos","events_url":"https://api.github.com/users/umts/events{/privacy}","received_events_url":"https://api.github.com/users/umts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/umts/jobapps","description":"Barebones Rails 4 app for job application, interview scheduling, demographic reporting, and application resource configuration.","fork":false,"url":"https://api.github.com/repos/umts/jobapps","forks_url":"https://api.github.com/repos/umts/jobapps/forks","keys_url":"https://api.github.com/repos/umts/jobapps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/umts/jobapps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/umts/jobapps/teams","hooks_url":"https://api.github.com/repos/umts/jobapps/hooks","issue_events_url":"https://api.github.com/repos/umts/jobapps/issues/events{/number}","events_url":"https://api.github.com/repos/umts/jobapps/events","assignees_url":"https://api.github.com/repos/umts/jobapps/assignees{/user}","branches_url":"https://api.github.com/repos/umts/jobapps/branches{/branch}","tags_url":"https://api.github.com/repos/umts/jobapps/tags","blobs_url":"https://api.github.com/repos/umts/jobapps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/umts/jobapps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/umts/jobapps/git/refs{/sha}","trees_url":"https://api.github.com/repos/umts/jobapps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/umts/jobapps/statuses/{sha}","languages_url":"https://api.github.com/repos/umts/jobapps/languages","stargazers_url":"https://api.github.com/repos/umts/jobapps/stargazers","contributors_url":"https://api.github.com/repos/umts/jobapps/contributors","subscribers_url":"https://api.github.com/repos/umts/jobapps/subscribers","subscription_url":"https://api.github.com/repos/umts/jobapps/subscription","commits_url":"https://api.github.com/repos/umts/jobapps/commits{/sha}","git_commits_url":"https://api.github.com/repos/umts/jobapps/git/commits{/sha}","comments_url":"https://api.github.com/repos/umts/jobapps/comments{/number}","issue_comment_url":"https://api.github.com/repos/umts/jobapps/issues/comments{/number}","contents_url":"https://api.github.com/repos/umts/jobapps/contents/{+path}","compare_url":"https://api.github.com/repos/umts/jobapps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/umts/jobapps/merges","archive_url":"https://api.github.com/repos/umts/jobapps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/umts/jobapps/downloads","issues_url":"https://api.github.com/repos/umts/jobapps/issues{/number}","pulls_url":"https://api.github.com/repos/umts/jobapps/pulls{/number}","milestones_url":"https://api.github.com/repos/umts/jobapps/milestones{/number}","notifications_url":"https://api.github.com/repos/umts/jobapps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/umts/jobapps/labels{/name}","releases_url":"https://api.github.com/repos/umts/jobapps/releases{/id}","deployments_url":"https://api.github.com/repos/umts/jobapps/deployments","created_at":"2015-05-19T21:34:57Z","updated_at":"2016-07-05T16:12:35Z","pushed_at":"2016-10-03T16:03:50Z","git_url":"git://github.com/umts/jobapps.git","ssh_url":"git@github.com:umts/jobapps.git","clone_url":"https://github.com/umts/jobapps.git","svn_url":"https://github.com/umts/jobapps","homepage":"https://transit-jobapps.admin.umass.edu","size":1792,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":8,"forks":7,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/umts/jobapps/pulls/270"},"html":{"href":"https://github.com/umts/jobapps/pull/270"},"issue":{"href":"https://api.github.com/repos/umts/jobapps/issues/270"},"comments":{"href":"https://api.github.com/repos/umts/jobapps/issues/270/comments"},"review_comments":{"href":"https://api.github.com/repos/umts/jobapps/pulls/270/comments"},"review_comment":{"href":"https://api.github.com/repos/umts/jobapps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/umts/jobapps/pulls/270/commits"},"statuses":{"href":"https://api.github.com/repos/umts/jobapps/statuses/91bda4a7a3073db7853961fde3d731a9387f6989"}}}}
{"actor":{"display_login":"dfaulken"}}