{"action":"created","comment":{"url":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/comments/75671686","id":75671686,"diff_hunk":"@@ -18,22 +19,46 @@\n     allow(Notifications::Client).to receive(:new).and_return(client)\n   end\n \n-  it 'sends a email notification' do\n-    expect(client).to receive(:send_email).with(\n-      {\n-        to: appointment_summary.email,\n-        template: 'template',\n-        personalisation: {\n-          reference_number: appointment_summary.reference_number,\n-          title: appointment_summary.title,\n-          last_name: appointment_summary.last_name,\n-          guider_name: appointment_summary.guider_name,\n-          date_of_appointment: appointment_summary.date_of_appointment.to_s(:pw_date_long)\n-        }\n-      }.to_json\n-    )\n+  context 'when the customer has a DC pension' do\n+    it 'sends a email notification' do\n+      expect(client).to receive(:send_email).with(\n+        {\n+          to: appointment_summary.email,\n+          template: 'template',\n+          personalisation: {\n+            reference_number: appointment_summary.reference_number,\n+            title: appointment_summary.title,\n+            last_name: appointment_summary.last_name,\n+            guider_name: appointment_summary.guider_name,\n+            date_of_appointment: appointment_summary.date_of_appointment.to_s(:pw_date_long)\n+          }\n+        }.to_json\n+      )\n \n-    described_class.perform_now(appointment_summary, config: config)\n+      described_class.perform_now(appointment_summary, config: config)\n+    end\n+  end\n+\n+  context 'when the customer does not have DC pension' do","path":"spec/jobs/notify_via_email_spec.rb","position":49,"original_position":49,"commit_id":"58d9660a57b993f4fbc463711790964513931c12","original_commit_id":"58d9660a57b993f4fbc463711790964513931c12","user":{"login":"benlovell","id":41963,"avatar_url":"https://avatars.githubusercontent.com/u/41963?v=3","gravatar_id":"","url":"https://api.github.com/users/benlovell","html_url":"https://github.com/benlovell","followers_url":"https://api.github.com/users/benlovell/followers","following_url":"https://api.github.com/users/benlovell/following{/other_user}","gists_url":"https://api.github.com/users/benlovell/gists{/gist_id}","starred_url":"https://api.github.com/users/benlovell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlovell/subscriptions","organizations_url":"https://api.github.com/users/benlovell/orgs","repos_url":"https://api.github.com/users/benlovell/repos","events_url":"https://api.github.com/users/benlovell/events{/privacy}","received_events_url":"https://api.github.com/users/benlovell/received_events","type":"User","site_admin":false},"body":"\"a DC pension\" would read slightly better here.","created_at":"2016-08-22T12:56:55Z","updated_at":"2016-08-22T12:56:55Z","html_url":"https://github.com/guidance-guarantee-programme/output/pull/223#discussion_r75671686","pull_request_url":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/223","_links":{"self":{"href":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/comments/75671686"},"html":{"href":"https://github.com/guidance-guarantee-programme/output/pull/223#discussion_r75671686"},"pull_request":{"href":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/223"}}},"pull_request":{"url":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/223","id":82185321,"html_url":"https://github.com/guidance-guarantee-programme/output/pull/223","diff_url":"https://github.com/guidance-guarantee-programme/output/pull/223.diff","patch_url":"https://github.com/guidance-guarantee-programme/output/pull/223.patch","issue_url":"https://api.github.com/repos/guidance-guarantee-programme/output/issues/223","number":223,"state":"open","locked":false,"title":"Send Ineligible template if customer is ineligible","user":{"login":"dwhenry","id":63736,"avatar_url":"https://avatars.githubusercontent.com/u/63736?v=3","gravatar_id":"","url":"https://api.github.com/users/dwhenry","html_url":"https://github.com/dwhenry","followers_url":"https://api.github.com/users/dwhenry/followers","following_url":"https://api.github.com/users/dwhenry/following{/other_user}","gists_url":"https://api.github.com/users/dwhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhenry/subscriptions","organizations_url":"https://api.github.com/users/dwhenry/orgs","repos_url":"https://api.github.com/users/dwhenry/repos","events_url":"https://api.github.com/users/dwhenry/events{/privacy}","received_events_url":"https://api.github.com/users/dwhenry/received_events","type":"User","site_admin":false},"body":"Previously guiders could only send notifications \r\nto ineligible customers via post\r\n\r\nThis release will correspond with an update to guider notes, allowing them to send ineligible notifications via email if the customer opts into digital.","created_at":"2016-08-22T12:51:42Z","updated_at":"2016-08-22T12:56:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d275402f07dbb67a9f63bbb3c57a6503695ada74","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/223/commits","review_comments_url":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/223/comments","review_comment_url":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guidance-guarantee-programme/output/issues/223/comments","statuses_url":"https://api.github.com/repos/guidance-guarantee-programme/output/statuses/58d9660a57b993f4fbc463711790964513931c12","head":{"label":"guidance-guarantee-programme:send-ineligible-email","ref":"send-ineligible-email","sha":"58d9660a57b993f4fbc463711790964513931c12","user":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"repo":{"id":31256384,"name":"output","full_name":"guidance-guarantee-programme/output","owner":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guidance-guarantee-programme/output","description":"Issue Pension Wise appointment output.","fork":false,"url":"https://api.github.com/repos/guidance-guarantee-programme/output","forks_url":"https://api.github.com/repos/guidance-guarantee-programme/output/forks","keys_url":"https://api.github.com/repos/guidance-guarantee-programme/output/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guidance-guarantee-programme/output/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guidance-guarantee-programme/output/teams","hooks_url":"https://api.github.com/repos/guidance-guarantee-programme/output/hooks","issue_events_url":"https://api.github.com/repos/guidance-guarantee-programme/output/issues/events{/number}","events_url":"https://api.github.com/repos/guidance-guarantee-programme/output/events","assignees_url":"https://api.github.com/repos/guidance-guarantee-programme/output/assignees{/user}","branches_url":"https://api.github.com/repos/guidance-guarantee-programme/output/branches{/branch}","tags_url":"https://api.github.com/repos/guidance-guarantee-programme/output/tags","blobs_url":"https://api.github.com/repos/guidance-guarantee-programme/output/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guidance-guarantee-programme/output/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guidance-guarantee-programme/output/git/refs{/sha}","trees_url":"https://api.github.com/repos/guidance-guarantee-programme/output/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guidance-guarantee-programme/output/statuses/{sha}","languages_url":"https://api.github.com/repos/guidance-guarantee-programme/output/languages","stargazers_url":"https://api.github.com/repos/guidance-guarantee-programme/output/stargazers","contributors_url":"https://api.github.com/repos/guidance-guarantee-programme/output/contributors","subscribers_url":"https://api.github.com/repos/guidance-guarantee-programme/output/subscribers","subscription_url":"https://api.github.com/repos/guidance-guarantee-programme/output/subscription","commits_url":"https://api.github.com/repos/guidance-guarantee-programme/output/commits{/sha}","git_commits_url":"https://api.github.com/repos/guidance-guarantee-programme/output/git/commits{/sha}","comments_url":"https://api.github.com/repos/guidance-guarantee-programme/output/comments{/number}","issue_comment_url":"https://api.github.com/repos/guidance-guarantee-programme/output/issues/comments{/number}","contents_url":"https://api.github.com/repos/guidance-guarantee-programme/output/contents/{+path}","compare_url":"https://api.github.com/repos/guidance-guarantee-programme/output/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guidance-guarantee-programme/output/merges","archive_url":"https://api.github.com/repos/guidance-guarantee-programme/output/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guidance-guarantee-programme/output/downloads","issues_url":"https://api.github.com/repos/guidance-guarantee-programme/output/issues{/number}","pulls_url":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls{/number}","milestones_url":"https://api.github.com/repos/guidance-guarantee-programme/output/milestones{/number}","notifications_url":"https://api.github.com/repos/guidance-guarantee-programme/output/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guidance-guarantee-programme/output/labels{/name}","releases_url":"https://api.github.com/repos/guidance-guarantee-programme/output/releases{/id}","deployments_url":"https://api.github.com/repos/guidance-guarantee-programme/output/deployments","created_at":"2015-02-24T11:06:44Z","updated_at":"2016-04-28T09:39:52Z","pushed_at":"2016-08-22T12:51:42Z","git_url":"git://github.com/guidance-guarantee-programme/output.git","ssh_url":"git@github.com:guidance-guarantee-programme/output.git","clone_url":"https://github.com/guidance-guarantee-programme/output.git","svn_url":"https://github.com/guidance-guarantee-programme/output","homepage":"https://output.pensionwise.gov.uk","size":1579,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"guidance-guarantee-programme:master","ref":"master","sha":"737ab922408f30eda0e8ede34c227d13b70cd867","user":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"repo":{"id":31256384,"name":"output","full_name":"guidance-guarantee-programme/output","owner":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guidance-guarantee-programme/output","description":"Issue Pension Wise appointment output.","fork":false,"url":"https://api.github.com/repos/guidance-guarantee-programme/output","forks_url":"https://api.github.com/repos/guidance-guarantee-programme/output/forks","keys_url":"https://api.github.com/repos/guidance-guarantee-programme/output/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guidance-guarantee-programme/output/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guidance-guarantee-programme/output/teams","hooks_url":"https://api.github.com/repos/guidance-guarantee-programme/output/hooks","issue_events_url":"https://api.github.com/repos/guidance-guarantee-programme/output/issues/events{/number}","events_url":"https://api.github.com/repos/guidance-guarantee-programme/output/events","assignees_url":"https://api.github.com/repos/guidance-guarantee-programme/output/assignees{/user}","branches_url":"https://api.github.com/repos/guidance-guarantee-programme/output/branches{/branch}","tags_url":"https://api.github.com/repos/guidance-guarantee-programme/output/tags","blobs_url":"https://api.github.com/repos/guidance-guarantee-programme/output/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guidance-guarantee-programme/output/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guidance-guarantee-programme/output/git/refs{/sha}","trees_url":"https://api.github.com/repos/guidance-guarantee-programme/output/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guidance-guarantee-programme/output/statuses/{sha}","languages_url":"https://api.github.com/repos/guidance-guarantee-programme/output/languages","stargazers_url":"https://api.github.com/repos/guidance-guarantee-programme/output/stargazers","contributors_url":"https://api.github.com/repos/guidance-guarantee-programme/output/contributors","subscribers_url":"https://api.github.com/repos/guidance-guarantee-programme/output/subscribers","subscription_url":"https://api.github.com/repos/guidance-guarantee-programme/output/subscription","commits_url":"https://api.github.com/repos/guidance-guarantee-programme/output/commits{/sha}","git_commits_url":"https://api.github.com/repos/guidance-guarantee-programme/output/git/commits{/sha}","comments_url":"https://api.github.com/repos/guidance-guarantee-programme/output/comments{/number}","issue_comment_url":"https://api.github.com/repos/guidance-guarantee-programme/output/issues/comments{/number}","contents_url":"https://api.github.com/repos/guidance-guarantee-programme/output/contents/{+path}","compare_url":"https://api.github.com/repos/guidance-guarantee-programme/output/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guidance-guarantee-programme/output/merges","archive_url":"https://api.github.com/repos/guidance-guarantee-programme/output/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guidance-guarantee-programme/output/downloads","issues_url":"https://api.github.com/repos/guidance-guarantee-programme/output/issues{/number}","pulls_url":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls{/number}","milestones_url":"https://api.github.com/repos/guidance-guarantee-programme/output/milestones{/number}","notifications_url":"https://api.github.com/repos/guidance-guarantee-programme/output/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guidance-guarantee-programme/output/labels{/name}","releases_url":"https://api.github.com/repos/guidance-guarantee-programme/output/releases{/id}","deployments_url":"https://api.github.com/repos/guidance-guarantee-programme/output/deployments","created_at":"2015-02-24T11:06:44Z","updated_at":"2016-04-28T09:39:52Z","pushed_at":"2016-08-22T12:51:42Z","git_url":"git://github.com/guidance-guarantee-programme/output.git","ssh_url":"git@github.com:guidance-guarantee-programme/output.git","clone_url":"https://github.com/guidance-guarantee-programme/output.git","svn_url":"https://github.com/guidance-guarantee-programme/output","homepage":"https://output.pensionwise.gov.uk","size":1579,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/223"},"html":{"href":"https://github.com/guidance-guarantee-programme/output/pull/223"},"issue":{"href":"https://api.github.com/repos/guidance-guarantee-programme/output/issues/223"},"comments":{"href":"https://api.github.com/repos/guidance-guarantee-programme/output/issues/223/comments"},"review_comments":{"href":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/223/comments"},"review_comment":{"href":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guidance-guarantee-programme/output/pulls/223/commits"},"statuses":{"href":"https://api.github.com/repos/guidance-guarantee-programme/output/statuses/58d9660a57b993f4fbc463711790964513931c12"}}}}
{"actor":{"display_login":"benlovell"}}