{"action":"created","comment":{"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/comments/67435039","id":67435039,"diff_hunk":"@@ -1,16 +1,21 @@\n require 'test_helper'\n \n class ImageTest < ActiveSupport::TestCase\n-  def test_new_successful_image\n-    newimage = Image.new(url: 'http.asdf')\n+  def test_valid_image_urls\n+    image = Image.new(url: 'http://somesite.com/awesomeimage1.jpg')\n \n-    assert_predicate newimage, :valid?\n+    assert_predicate image, :valid?\n   end\n \n-  def test_new_invalid_image\n-    newimageerror = Image.new(url: 'asdf')\n+  def test_invalid_image_urls\n+    errorimages = [\n+      Image.new(url: 'somestringthatisnotaurl'),\n+      Image.new(url: 'httpsomesite.com/awesomeimage3.png'),\n+      Image.new(url: '')\n+    ]\n \n-    assert_predicate newimageerror, :invalid?\n-    assert_includes newimageerror.errors.messages[:url], 'does not begin with http'","path":"test/models/image_test.rb","position":23,"original_position":23,"commit_id":"37445e6fc2fe60683f3333eb686f57fc15e48d35","original_commit_id":"37445e6fc2fe60683f3333eb686f57fc15e48d35","user":{"login":"bboe","id":48100,"avatar_url":"https://avatars.githubusercontent.com/u/48100?v=3","gravatar_id":"","url":"https://api.github.com/users/bboe","html_url":"https://github.com/bboe","followers_url":"https://api.github.com/users/bboe/followers","following_url":"https://api.github.com/users/bboe/following{/other_user}","gists_url":"https://api.github.com/users/bboe/gists{/gist_id}","starred_url":"https://api.github.com/users/bboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboe/subscriptions","organizations_url":"https://api.github.com/users/bboe/orgs","repos_url":"https://api.github.com/users/bboe/repos","events_url":"https://api.github.com/users/bboe/events{/privacy}","received_events_url":"https://api.github.com/users/bboe/received_events","type":"User","site_admin":false},"body":"I think it's still important that we test the error message to ensure someone doesn't change it accidentally (defensive testing).","created_at":"2016-06-16T22:23:50Z","updated_at":"2016-06-16T22:23:50Z","html_url":"https://github.com/AppFolioOnboarding/image-sharer-lightbright/pull/19#discussion_r67435039","pull_request_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/comments/67435039"},"html":{"href":"https://github.com/AppFolioOnboarding/image-sharer-lightbright/pull/19#discussion_r67435039"},"pull_request":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/19","id":74120941,"html_url":"https://github.com/AppFolioOnboarding/image-sharer-lightbright/pull/19","diff_url":"https://github.com/AppFolioOnboarding/image-sharer-lightbright/pull/19.diff","patch_url":"https://github.com/AppFolioOnboarding/image-sharer-lightbright/pull/19.patch","issue_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/issues/19","number":19,"state":"closed","locked":false,"title":"Image validation","user":{"login":"lightbright","id":6063967,"avatar_url":"https://avatars.githubusercontent.com/u/6063967?v=3","gravatar_id":"","url":"https://api.github.com/users/lightbright","html_url":"https://github.com/lightbright","followers_url":"https://api.github.com/users/lightbright/followers","following_url":"https://api.github.com/users/lightbright/following{/other_user}","gists_url":"https://api.github.com/users/lightbright/gists{/gist_id}","starred_url":"https://api.github.com/users/lightbright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightbright/subscriptions","organizations_url":"https://api.github.com/users/lightbright/orgs","repos_url":"https://api.github.com/users/lightbright/repos","events_url":"https://api.github.com/users/lightbright/events{/privacy}","received_events_url":"https://api.github.com/users/lightbright/received_events","type":"User","site_admin":false},"body":"Closes #4\r\n","created_at":"2016-06-16T17:32:03Z","updated_at":"2016-06-16T22:23:50Z","closed_at":"2016-06-16T20:32:15Z","merged_at":"2016-06-16T20:32:14Z","merge_commit_sha":"901da928097eef1a3b11c93b6d3672d8526f6401","assignee":{"login":"XanderStrike","id":1565303,"avatar_url":"https://avatars.githubusercontent.com/u/1565303?v=3","gravatar_id":"","url":"https://api.github.com/users/XanderStrike","html_url":"https://github.com/XanderStrike","followers_url":"https://api.github.com/users/XanderStrike/followers","following_url":"https://api.github.com/users/XanderStrike/following{/other_user}","gists_url":"https://api.github.com/users/XanderStrike/gists{/gist_id}","starred_url":"https://api.github.com/users/XanderStrike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XanderStrike/subscriptions","organizations_url":"https://api.github.com/users/XanderStrike/orgs","repos_url":"https://api.github.com/users/XanderStrike/repos","events_url":"https://api.github.com/users/XanderStrike/events{/privacy}","received_events_url":"https://api.github.com/users/XanderStrike/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/19/commits","review_comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/19/comments","review_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/issues/19/comments","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/statuses/37445e6fc2fe60683f3333eb686f57fc15e48d35","head":{"label":"AppFolioOnboarding:ImageValidation","ref":"ImageValidation","sha":"37445e6fc2fe60683f3333eb686f57fc15e48d35","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":61061791,"name":"image-sharer-lightbright","full_name":"AppFolioOnboarding/image-sharer-lightbright","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-lightbright","description":"image-sharer-lightbright created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright","forks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/forks","keys_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/teams","hooks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/hooks","issue_events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/issues/events{/number}","events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/events","assignees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/assignees{/user}","branches_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/branches{/branch}","tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/tags","blobs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/statuses/{sha}","languages_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/languages","stargazers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/stargazers","contributors_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/contributors","subscribers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/subscribers","subscription_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/subscription","commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/contents/{+path}","compare_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/merges","archive_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/downloads","issues_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/issues{/number}","pulls_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls{/number}","milestones_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/milestones{/number}","notifications_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/labels{/name}","releases_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/releases{/id}","deployments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/deployments","created_at":"2016-06-13T18:55:47Z","updated_at":"2016-06-13T18:55:53Z","pushed_at":"2016-06-16T22:20:30Z","git_url":"git://github.com/AppFolioOnboarding/image-sharer-lightbright.git","ssh_url":"git@github.com:AppFolioOnboarding/image-sharer-lightbright.git","clone_url":"https://github.com/AppFolioOnboarding/image-sharer-lightbright.git","svn_url":"https://github.com/AppFolioOnboarding/image-sharer-lightbright","homepage":null,"size":58,"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":"0dc9c69b9dec252c271ef7b1af1c29ff68beb0f7","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":61061791,"name":"image-sharer-lightbright","full_name":"AppFolioOnboarding/image-sharer-lightbright","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-lightbright","description":"image-sharer-lightbright created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright","forks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/forks","keys_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/teams","hooks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/hooks","issue_events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/issues/events{/number}","events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/events","assignees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/assignees{/user}","branches_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/branches{/branch}","tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/tags","blobs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/statuses/{sha}","languages_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/languages","stargazers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/stargazers","contributors_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/contributors","subscribers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/subscribers","subscription_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/subscription","commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/contents/{+path}","compare_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/merges","archive_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/downloads","issues_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/issues{/number}","pulls_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls{/number}","milestones_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/milestones{/number}","notifications_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/labels{/name}","releases_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/releases{/id}","deployments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/deployments","created_at":"2016-06-13T18:55:47Z","updated_at":"2016-06-13T18:55:53Z","pushed_at":"2016-06-16T22:20:30Z","git_url":"git://github.com/AppFolioOnboarding/image-sharer-lightbright.git","ssh_url":"git@github.com:AppFolioOnboarding/image-sharer-lightbright.git","clone_url":"https://github.com/AppFolioOnboarding/image-sharer-lightbright.git","svn_url":"https://github.com/AppFolioOnboarding/image-sharer-lightbright","homepage":null,"size":58,"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-lightbright/pulls/19"},"html":{"href":"https://github.com/AppFolioOnboarding/image-sharer-lightbright/pull/19"},"issue":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/issues/19"},"comments":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lightbright/statuses/37445e6fc2fe60683f3333eb686f57fc15e48d35"}}}}
{"actor":{"display_login":"bboe"}}