{"action":"created","comment":{"url":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/comments/40242369","id":40242369,"diff_hunk":"@@ -0,0 +1,59 @@\n+require \"rails_helper\"\n+\n+feature 'user or admin can delete their review for a theme song', %(\n+  As a user I want to delete my review\n+  Because I'm a human and I can change my mind\n+) do\n+\n+  # Acceptance Criteria\n+  # [ ] User or Admin can view delete link under comments\n+  # [ ] When the user submits the review, the user is directed\n+  #     the show page for that program\n+  # [ ] The page must display that the comment was deleted.\n+  # [ ] A flash message to indicate success\n+  # [ ] A flash message to indicate failure\n+\n+  scenario 'user deletes a review successfully' do\n+    user = FactoryGirl.create(:user)\n+    program_1 = FactoryGirl.create(:program)\n+    review = FactoryGirl.create(\n+      :review,\n+      body: \"This is a test! Lets see if it works\",\n+      program: program_1,\n+      user: user\n+    )\n+\n+    sign_in(user)\n+    expect(page).to have_content('Signed in successfully')\n+\n+    visit program_path(program_1)\n+\n+    click_link(\"Delete Comment\")\n+\n+    expect(page).not_to have_content(review.body)\n+  end\n+\n+  scenario 'admin deletes a review successfully' do\n+    admin = FactoryGirl.create(:user, admin: true)\n+    user = FactoryGirl.create(:user)\n+    program_1 = FactoryGirl.create(:program)\n+    review = FactoryGirl.create(\n+      :review,\n+      body: \"This is a test! Lets see if it works\",\n+      program: program_1,\n+      user: user\n+    )","path":"spec/features/user_deletes_their_comment_spec.rb","position":45,"original_position":45,"commit_id":"ff8fc4d6177864bf63b15b016ab0a184997fd052","original_commit_id":"ff8fc4d6177864bf63b15b016ab0a184997fd052","user":{"login":"radavis","id":1299034,"avatar_url":"https://avatars.githubusercontent.com/u/1299034?v=3","gravatar_id":"","url":"https://api.github.com/users/radavis","html_url":"https://github.com/radavis","followers_url":"https://api.github.com/users/radavis/followers","following_url":"https://api.github.com/users/radavis/following{/other_user}","gists_url":"https://api.github.com/users/radavis/gists{/gist_id}","starred_url":"https://api.github.com/users/radavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radavis/subscriptions","organizations_url":"https://api.github.com/users/radavis/orgs","repos_url":"https://api.github.com/users/radavis/repos","events_url":"https://api.github.com/users/radavis/events{/privacy}","received_events_url":"https://api.github.com/users/radavis/received_events","type":"User","site_admin":false},"body":"You could just `review = FactoryGirl.create(:review)` and it would create an associated user and program and use those in your test.","created_at":"2015-09-23T18:52:46Z","updated_at":"2015-09-23T18:52:46Z","html_url":"https://github.com/latter-jacob/couch_potatoes/pull/11#discussion_r40242369","pull_request_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/comments/40242369"},"html":{"href":"https://github.com/latter-jacob/couch_potatoes/pull/11#discussion_r40242369"},"pull_request":{"href":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/11","id":45810511,"html_url":"https://github.com/latter-jacob/couch_potatoes/pull/11","diff_url":"https://github.com/latter-jacob/couch_potatoes/pull/11.diff","patch_url":"https://github.com/latter-jacob/couch_potatoes/pull/11.patch","issue_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/issues/11","number":11,"state":"open","locked":false,"title":"Added edit and delete buttons for reviews","user":{"login":"jgertz26","id":12990876,"avatar_url":"https://avatars.githubusercontent.com/u/12990876?v=3","gravatar_id":"","url":"https://api.github.com/users/jgertz26","html_url":"https://github.com/jgertz26","followers_url":"https://api.github.com/users/jgertz26/followers","following_url":"https://api.github.com/users/jgertz26/following{/other_user}","gists_url":"https://api.github.com/users/jgertz26/gists{/gist_id}","starred_url":"https://api.github.com/users/jgertz26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgertz26/subscriptions","organizations_url":"https://api.github.com/users/jgertz26/orgs","repos_url":"https://api.github.com/users/jgertz26/repos","events_url":"https://api.github.com/users/jgertz26/events{/privacy}","received_events_url":"https://api.github.com/users/jgertz26/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-23T17:58:52Z","updated_at":"2015-09-23T18:52:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01f87aee9c48705dc581db0186a8a91409e7ee13","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/11/commits","review_comments_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/11/comments","review_comment_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/issues/11/comments","statuses_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/statuses/ff8fc4d6177864bf63b15b016ab0a184997fd052","head":{"label":"latter-jacob:jag-edit_reviews","ref":"jag-edit_reviews","sha":"ff8fc4d6177864bf63b15b016ab0a184997fd052","user":{"login":"latter-jacob","id":12823340,"avatar_url":"https://avatars.githubusercontent.com/u/12823340?v=3","gravatar_id":"","url":"https://api.github.com/users/latter-jacob","html_url":"https://github.com/latter-jacob","followers_url":"https://api.github.com/users/latter-jacob/followers","following_url":"https://api.github.com/users/latter-jacob/following{/other_user}","gists_url":"https://api.github.com/users/latter-jacob/gists{/gist_id}","starred_url":"https://api.github.com/users/latter-jacob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latter-jacob/subscriptions","organizations_url":"https://api.github.com/users/latter-jacob/orgs","repos_url":"https://api.github.com/users/latter-jacob/repos","events_url":"https://api.github.com/users/latter-jacob/events{/privacy}","received_events_url":"https://api.github.com/users/latter-jacob/received_events","type":"User","site_admin":false},"repo":{"id":42874265,"name":"couch_potatoes","full_name":"latter-jacob/couch_potatoes","owner":{"login":"latter-jacob","id":12823340,"avatar_url":"https://avatars.githubusercontent.com/u/12823340?v=3","gravatar_id":"","url":"https://api.github.com/users/latter-jacob","html_url":"https://github.com/latter-jacob","followers_url":"https://api.github.com/users/latter-jacob/followers","following_url":"https://api.github.com/users/latter-jacob/following{/other_user}","gists_url":"https://api.github.com/users/latter-jacob/gists{/gist_id}","starred_url":"https://api.github.com/users/latter-jacob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latter-jacob/subscriptions","organizations_url":"https://api.github.com/users/latter-jacob/orgs","repos_url":"https://api.github.com/users/latter-jacob/repos","events_url":"https://api.github.com/users/latter-jacob/events{/privacy}","received_events_url":"https://api.github.com/users/latter-jacob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/latter-jacob/couch_potatoes","description":"","fork":false,"url":"https://api.github.com/repos/latter-jacob/couch_potatoes","forks_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/forks","keys_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/teams","hooks_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/hooks","issue_events_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/issues/events{/number}","events_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/events","assignees_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/assignees{/user}","branches_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/branches{/branch}","tags_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/tags","blobs_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/git/refs{/sha}","trees_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/statuses/{sha}","languages_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/languages","stargazers_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/stargazers","contributors_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/contributors","subscribers_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/subscribers","subscription_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/subscription","commits_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/commits{/sha}","git_commits_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/git/commits{/sha}","comments_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/comments{/number}","issue_comment_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/issues/comments{/number}","contents_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/contents/{+path}","compare_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/merges","archive_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/downloads","issues_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/issues{/number}","pulls_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls{/number}","milestones_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/milestones{/number}","notifications_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/labels{/name}","releases_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/releases{/id}","created_at":"2015-09-21T15:13:51Z","updated_at":"2015-09-22T18:02:34Z","pushed_at":"2015-09-23T18:01:46Z","git_url":"git://github.com/latter-jacob/couch_potatoes.git","ssh_url":"git@github.com:latter-jacob/couch_potatoes.git","clone_url":"https://github.com/latter-jacob/couch_potatoes.git","svn_url":"https://github.com/latter-jacob/couch_potatoes","homepage":null,"size":384,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"latter-jacob:master","ref":"master","sha":"edc63281addd87e27d9f3c162ed76e2d1182c3ec","user":{"login":"latter-jacob","id":12823340,"avatar_url":"https://avatars.githubusercontent.com/u/12823340?v=3","gravatar_id":"","url":"https://api.github.com/users/latter-jacob","html_url":"https://github.com/latter-jacob","followers_url":"https://api.github.com/users/latter-jacob/followers","following_url":"https://api.github.com/users/latter-jacob/following{/other_user}","gists_url":"https://api.github.com/users/latter-jacob/gists{/gist_id}","starred_url":"https://api.github.com/users/latter-jacob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latter-jacob/subscriptions","organizations_url":"https://api.github.com/users/latter-jacob/orgs","repos_url":"https://api.github.com/users/latter-jacob/repos","events_url":"https://api.github.com/users/latter-jacob/events{/privacy}","received_events_url":"https://api.github.com/users/latter-jacob/received_events","type":"User","site_admin":false},"repo":{"id":42874265,"name":"couch_potatoes","full_name":"latter-jacob/couch_potatoes","owner":{"login":"latter-jacob","id":12823340,"avatar_url":"https://avatars.githubusercontent.com/u/12823340?v=3","gravatar_id":"","url":"https://api.github.com/users/latter-jacob","html_url":"https://github.com/latter-jacob","followers_url":"https://api.github.com/users/latter-jacob/followers","following_url":"https://api.github.com/users/latter-jacob/following{/other_user}","gists_url":"https://api.github.com/users/latter-jacob/gists{/gist_id}","starred_url":"https://api.github.com/users/latter-jacob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latter-jacob/subscriptions","organizations_url":"https://api.github.com/users/latter-jacob/orgs","repos_url":"https://api.github.com/users/latter-jacob/repos","events_url":"https://api.github.com/users/latter-jacob/events{/privacy}","received_events_url":"https://api.github.com/users/latter-jacob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/latter-jacob/couch_potatoes","description":"","fork":false,"url":"https://api.github.com/repos/latter-jacob/couch_potatoes","forks_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/forks","keys_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/teams","hooks_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/hooks","issue_events_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/issues/events{/number}","events_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/events","assignees_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/assignees{/user}","branches_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/branches{/branch}","tags_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/tags","blobs_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/git/refs{/sha}","trees_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/statuses/{sha}","languages_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/languages","stargazers_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/stargazers","contributors_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/contributors","subscribers_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/subscribers","subscription_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/subscription","commits_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/commits{/sha}","git_commits_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/git/commits{/sha}","comments_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/comments{/number}","issue_comment_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/issues/comments{/number}","contents_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/contents/{+path}","compare_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/merges","archive_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/downloads","issues_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/issues{/number}","pulls_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls{/number}","milestones_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/milestones{/number}","notifications_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/labels{/name}","releases_url":"https://api.github.com/repos/latter-jacob/couch_potatoes/releases{/id}","created_at":"2015-09-21T15:13:51Z","updated_at":"2015-09-22T18:02:34Z","pushed_at":"2015-09-23T18:01:46Z","git_url":"git://github.com/latter-jacob/couch_potatoes.git","ssh_url":"git@github.com:latter-jacob/couch_potatoes.git","clone_url":"https://github.com/latter-jacob/couch_potatoes.git","svn_url":"https://github.com/latter-jacob/couch_potatoes","homepage":null,"size":384,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/11"},"html":{"href":"https://github.com/latter-jacob/couch_potatoes/pull/11"},"issue":{"href":"https://api.github.com/repos/latter-jacob/couch_potatoes/issues/11"},"comments":{"href":"https://api.github.com/repos/latter-jacob/couch_potatoes/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/latter-jacob/couch_potatoes/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/latter-jacob/couch_potatoes/statuses/ff8fc4d6177864bf63b15b016ab0a184997fd052"}}}}