{"action":"created","comment":{"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/comments/74319924","id":74319924,"diff_hunk":"@@ -68,4 +68,33 @@ class ImagesControllerTest < ActionDispatch::IntegrationTest\n     assert_equal 422, response.status\n     assert_equal ['is not a valid image URL'], body['errors']['url']\n   end\n+\n+  test 'share should send an email' do\n+    image = Image.create! url: 'http://example.image.url'\n+\n+    assert_difference -> { ActionMailer::Base.deliveries.length }, 1 do\n+      post share_image_url(image), as: :json, params: {\n+        recipient: 'nobody@appfolio.com',\n+        message: 'here is the image for you'\n+      }\n+    end\n+\n+    assert_equal 204, response.status\n+\n+    email = ActionMailer::Base.deliveries.last\n+    assert_equal ['ropes@appfolio.com'], email.from\n+    assert_equal ['nobody@appfolio.com'], email.to\n+    assert_equal 'An image has been shared with you', email.subject","path":"test/controllers/images_controller_test.rb","position":20,"original_position":20,"commit_id":"19f73f198d4fa7a9f07b3aa31bc8c0b1c37c7086","original_commit_id":"fb2d90e615f3470584a95cfcee94196aa33b31c0","user":{"login":"rmacklin","id":1863540,"avatar_url":"https://avatars.githubusercontent.com/u/1863540?v=3","gravatar_id":"","url":"https://api.github.com/users/rmacklin","html_url":"https://github.com/rmacklin","followers_url":"https://api.github.com/users/rmacklin/followers","following_url":"https://api.github.com/users/rmacklin/following{/other_user}","gists_url":"https://api.github.com/users/rmacklin/gists{/gist_id}","starred_url":"https://api.github.com/users/rmacklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmacklin/subscriptions","organizations_url":"https://api.github.com/users/rmacklin/orgs","repos_url":"https://api.github.com/users/rmacklin/repos","events_url":"https://api.github.com/users/rmacklin/events{/privacy}","received_events_url":"https://api.github.com/users/rmacklin/received_events","type":"User","site_admin":false},"body":"We should also assert that the _correct_ image was shared.","created_at":"2016-08-10T20:07:34Z","updated_at":"2016-08-10T20:07:34Z","html_url":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor/pull/29#discussion_r74319924","pull_request_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/comments/74319924"},"html":{"href":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor/pull/29#discussion_r74319924"},"pull_request":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/29","id":80829754,"html_url":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor/pull/29","diff_url":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor/pull/29.diff","patch_url":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor/pull/29.patch","issue_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/issues/29","number":29,"state":"open","locked":false,"title":"Share image","user":{"login":"tlconnor","id":37422,"avatar_url":"https://avatars.githubusercontent.com/u/37422?v=3","gravatar_id":"","url":"https://api.github.com/users/tlconnor","html_url":"https://github.com/tlconnor","followers_url":"https://api.github.com/users/tlconnor/followers","following_url":"https://api.github.com/users/tlconnor/following{/other_user}","gists_url":"https://api.github.com/users/tlconnor/gists{/gist_id}","starred_url":"https://api.github.com/users/tlconnor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlconnor/subscriptions","organizations_url":"https://api.github.com/users/tlconnor/orgs","repos_url":"https://api.github.com/users/tlconnor/repos","events_url":"https://api.github.com/users/tlconnor/events{/privacy}","received_events_url":"https://api.github.com/users/tlconnor/received_events","type":"User","site_admin":false},"body":"Closes #10 ","created_at":"2016-08-10T16:57:06Z","updated_at":"2016-08-10T20:07:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6cdf666095d6505058fa6cae65533a12cf2e7005","assignee":{"login":"rmacklin","id":1863540,"avatar_url":"https://avatars.githubusercontent.com/u/1863540?v=3","gravatar_id":"","url":"https://api.github.com/users/rmacklin","html_url":"https://github.com/rmacklin","followers_url":"https://api.github.com/users/rmacklin/followers","following_url":"https://api.github.com/users/rmacklin/following{/other_user}","gists_url":"https://api.github.com/users/rmacklin/gists{/gist_id}","starred_url":"https://api.github.com/users/rmacklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmacklin/subscriptions","organizations_url":"https://api.github.com/users/rmacklin/orgs","repos_url":"https://api.github.com/users/rmacklin/repos","events_url":"https://api.github.com/users/rmacklin/events{/privacy}","received_events_url":"https://api.github.com/users/rmacklin/received_events","type":"User","site_admin":false},"assignees":[{"login":"rmacklin","id":1863540,"avatar_url":"https://avatars.githubusercontent.com/u/1863540?v=3","gravatar_id":"","url":"https://api.github.com/users/rmacklin","html_url":"https://github.com/rmacklin","followers_url":"https://api.github.com/users/rmacklin/followers","following_url":"https://api.github.com/users/rmacklin/following{/other_user}","gists_url":"https://api.github.com/users/rmacklin/gists{/gist_id}","starred_url":"https://api.github.com/users/rmacklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmacklin/subscriptions","organizations_url":"https://api.github.com/users/rmacklin/orgs","repos_url":"https://api.github.com/users/rmacklin/repos","events_url":"https://api.github.com/users/rmacklin/events{/privacy}","received_events_url":"https://api.github.com/users/rmacklin/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/29/commits","review_comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/29/comments","review_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/issues/29/comments","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/statuses/19f73f198d4fa7a9f07b3aa31bc8c0b1c37c7086","head":{"label":"AppFolioOnboarding:share-image","ref":"share-image","sha":"19f73f198d4fa7a9f07b3aa31bc8c0b1c37c7086","user":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"repo":{"id":63969760,"name":"image-sharer-tlconnor","full_name":"AppFolioOnboarding/image-sharer-tlconnor","owner":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor","description":"image-sharer-tlconnor created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor","forks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/forks","keys_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/teams","hooks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/hooks","issue_events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/issues/events{/number}","events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/events","assignees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/assignees{/user}","branches_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/branches{/branch}","tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/tags","blobs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/statuses/{sha}","languages_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/languages","stargazers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/stargazers","contributors_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/contributors","subscribers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/subscribers","subscription_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/subscription","commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/contents/{+path}","compare_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/merges","archive_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/downloads","issues_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/issues{/number}","pulls_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls{/number}","milestones_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/milestones{/number}","notifications_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/labels{/name}","releases_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/releases{/id}","deployments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/deployments","created_at":"2016-07-22T17:01:42Z","updated_at":"2016-07-22T17:01:50Z","pushed_at":"2016-08-10T17:07:27Z","git_url":"git://github.com/AppFolioOnboarding/image-sharer-tlconnor.git","ssh_url":"git@github.com:AppFolioOnboarding/image-sharer-tlconnor.git","clone_url":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor.git","svn_url":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor","homepage":null,"size":143,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"base":{"label":"AppFolioOnboarding:master","ref":"master","sha":"b7160c312fca3e9029c1e1999ab18cc14b0c6187","user":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"repo":{"id":63969760,"name":"image-sharer-tlconnor","full_name":"AppFolioOnboarding/image-sharer-tlconnor","owner":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor","description":"image-sharer-tlconnor created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor","forks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/forks","keys_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/teams","hooks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/hooks","issue_events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/issues/events{/number}","events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/events","assignees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/assignees{/user}","branches_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/branches{/branch}","tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/tags","blobs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/statuses/{sha}","languages_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/languages","stargazers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/stargazers","contributors_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/contributors","subscribers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/subscribers","subscription_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/subscription","commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/contents/{+path}","compare_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/merges","archive_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/downloads","issues_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/issues{/number}","pulls_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls{/number}","milestones_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/milestones{/number}","notifications_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/labels{/name}","releases_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/releases{/id}","deployments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/deployments","created_at":"2016-07-22T17:01:42Z","updated_at":"2016-07-22T17:01:50Z","pushed_at":"2016-08-10T17:07:27Z","git_url":"git://github.com/AppFolioOnboarding/image-sharer-tlconnor.git","ssh_url":"git@github.com:AppFolioOnboarding/image-sharer-tlconnor.git","clone_url":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor.git","svn_url":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor","homepage":null,"size":143,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/29"},"html":{"href":"https://github.com/AppFolioOnboarding/image-sharer-tlconnor/pull/29"},"issue":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/issues/29"},"comments":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-tlconnor/statuses/19f73f198d4fa7a9f07b3aa31bc8c0b1c37c7086"}}}}
{"actor":{"display_login":"rmacklin"}}