{"action":"created","comment":{"url":"https://api.github.com/repos/pfricker/Robots-Review/pulls/comments/33813936","id":33813936,"diff_hunk":"@@ -0,0 +1,107 @@\n+require 'rails_helper'\n+\n+feature 'user edits an existing review', %{\n+  As a user\n+  I want to sign in\n+  And edit a review I made\n+} do\n+\n+  let(:user) { FactoryGirl.create :user }\n+  let(:species_id){ Species.where(scientific_name: 'homo sapien')[0].id }\n+\n+  before do\n+    # sign in\n+    visit new_user_session_path\n+\n+    fill_in 'Email', with: user.email\n+    fill_in 'Password', with: user.password\n+\n+    click_button 'Log in'\n+\n+    # create a new species\n+    visit '/species/new'\n+\n+    fill_in 'Scientific name', with: 'homo sapien'\n+    fill_in 'Common name', with: 'human'\n+    click_button 'Add Species'\n+\n+    expect(page).to have_content('added')\n+\n+    # add a new review\n+    visit \"/species/#{species_id}\"\n+\n+    click_link 'New Review'\n+\n+    fill_in 'Comment', with: 'Fantastic Specimen!'\n+    fill_in 'Rating', with: '9'\n+    click_button 'Add Review'\n+\n+    expect(page).to have_content(\"Fantastic Specimen!\")\n+    expect(page).to have_content(\"9\")\n+    expect(page).to have_content(\"Review added\")\n+  end\n+\n+  scenario 'Edited correctly with new comment and rating' do\n+    visit \"/species/#{species_id}\"","path":"spec/features/user_edits_review_spec.rb","position":45,"original_position":45,"commit_id":"985b05e196b82527ed42a47b85145bcbbf9dee7e","original_commit_id":"985b05e196b82527ed42a47b85145bcbbf9dee7e","user":{"login":"telundberg","id":8852592,"avatar_url":"https://avatars.githubusercontent.com/u/8852592?v=3","gravatar_id":"","url":"https://api.github.com/users/telundberg","html_url":"https://github.com/telundberg","followers_url":"https://api.github.com/users/telundberg/followers","following_url":"https://api.github.com/users/telundberg/following{/other_user}","gists_url":"https://api.github.com/users/telundberg/gists{/gist_id}","starred_url":"https://api.github.com/users/telundberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telundberg/subscriptions","organizations_url":"https://api.github.com/users/telundberg/orgs","repos_url":"https://api.github.com/users/telundberg/repos","events_url":"https://api.github.com/users/telundberg/events{/privacy}","received_events_url":"https://api.github.com/users/telundberg/received_events","type":"User","site_admin":false},"body":"✓","created_at":"2015-07-02T19:29:57Z","updated_at":"2015-07-02T19:29:57Z","html_url":"https://github.com/pfricker/Robots-Review/pull/8#discussion_r33813936","pull_request_url":"https://api.github.com/repos/pfricker/Robots-Review/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/pfricker/Robots-Review/pulls/comments/33813936"},"html":{"href":"https://github.com/pfricker/Robots-Review/pull/8#discussion_r33813936"},"pull_request":{"href":"https://api.github.com/repos/pfricker/Robots-Review/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/pfricker/Robots-Review/pulls/8","id":39016215,"html_url":"https://github.com/pfricker/Robots-Review/pull/8","diff_url":"https://github.com/pfricker/Robots-Review/pull/8.diff","patch_url":"https://github.com/pfricker/Robots-Review/pull/8.patch","issue_url":"https://api.github.com/repos/pfricker/Robots-Review/issues/8","number":8,"state":"open","locked":false,"title":"rfr: Add / Edit species; Add / Edit / Delete reviews ","user":{"login":"telundberg","id":8852592,"avatar_url":"https://avatars.githubusercontent.com/u/8852592?v=3","gravatar_id":"","url":"https://api.github.com/users/telundberg","html_url":"https://github.com/telundberg","followers_url":"https://api.github.com/users/telundberg/followers","following_url":"https://api.github.com/users/telundberg/following{/other_user}","gists_url":"https://api.github.com/users/telundberg/gists{/gist_id}","starred_url":"https://api.github.com/users/telundberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telundberg/subscriptions","organizations_url":"https://api.github.com/users/telundberg/orgs","repos_url":"https://api.github.com/users/telundberg/repos","events_url":"https://api.github.com/users/telundberg/events{/privacy}","received_events_url":"https://api.github.com/users/telundberg/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-01T19:24:34Z","updated_at":"2015-07-02T19:29:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"53fd4ec449b9852ac1e5f340a266807dd8348c3c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pfricker/Robots-Review/pulls/8/commits","review_comments_url":"https://api.github.com/repos/pfricker/Robots-Review/pulls/8/comments","review_comment_url":"https://api.github.com/repos/pfricker/Robots-Review/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pfricker/Robots-Review/issues/8/comments","statuses_url":"https://api.github.com/repos/pfricker/Robots-Review/statuses/985b05e196b82527ed42a47b85145bcbbf9dee7e","head":{"label":"pfricker:add_edit_species","ref":"add_edit_species","sha":"985b05e196b82527ed42a47b85145bcbbf9dee7e","user":{"login":"pfricker","id":10181571,"avatar_url":"https://avatars.githubusercontent.com/u/10181571?v=3","gravatar_id":"","url":"https://api.github.com/users/pfricker","html_url":"https://github.com/pfricker","followers_url":"https://api.github.com/users/pfricker/followers","following_url":"https://api.github.com/users/pfricker/following{/other_user}","gists_url":"https://api.github.com/users/pfricker/gists{/gist_id}","starred_url":"https://api.github.com/users/pfricker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfricker/subscriptions","organizations_url":"https://api.github.com/users/pfricker/orgs","repos_url":"https://api.github.com/users/pfricker/repos","events_url":"https://api.github.com/users/pfricker/events{/privacy}","received_events_url":"https://api.github.com/users/pfricker/received_events","type":"User","site_admin":false},"repo":{"id":38256959,"name":"Robots-Review","full_name":"pfricker/Robots-Review","owner":{"login":"pfricker","id":10181571,"avatar_url":"https://avatars.githubusercontent.com/u/10181571?v=3","gravatar_id":"","url":"https://api.github.com/users/pfricker","html_url":"https://github.com/pfricker","followers_url":"https://api.github.com/users/pfricker/followers","following_url":"https://api.github.com/users/pfricker/following{/other_user}","gists_url":"https://api.github.com/users/pfricker/gists{/gist_id}","starred_url":"https://api.github.com/users/pfricker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfricker/subscriptions","organizations_url":"https://api.github.com/users/pfricker/orgs","repos_url":"https://api.github.com/users/pfricker/repos","events_url":"https://api.github.com/users/pfricker/events{/privacy}","received_events_url":"https://api.github.com/users/pfricker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pfricker/Robots-Review","description":"","fork":false,"url":"https://api.github.com/repos/pfricker/Robots-Review","forks_url":"https://api.github.com/repos/pfricker/Robots-Review/forks","keys_url":"https://api.github.com/repos/pfricker/Robots-Review/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pfricker/Robots-Review/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pfricker/Robots-Review/teams","hooks_url":"https://api.github.com/repos/pfricker/Robots-Review/hooks","issue_events_url":"https://api.github.com/repos/pfricker/Robots-Review/issues/events{/number}","events_url":"https://api.github.com/repos/pfricker/Robots-Review/events","assignees_url":"https://api.github.com/repos/pfricker/Robots-Review/assignees{/user}","branches_url":"https://api.github.com/repos/pfricker/Robots-Review/branches{/branch}","tags_url":"https://api.github.com/repos/pfricker/Robots-Review/tags","blobs_url":"https://api.github.com/repos/pfricker/Robots-Review/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pfricker/Robots-Review/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pfricker/Robots-Review/git/refs{/sha}","trees_url":"https://api.github.com/repos/pfricker/Robots-Review/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pfricker/Robots-Review/statuses/{sha}","languages_url":"https://api.github.com/repos/pfricker/Robots-Review/languages","stargazers_url":"https://api.github.com/repos/pfricker/Robots-Review/stargazers","contributors_url":"https://api.github.com/repos/pfricker/Robots-Review/contributors","subscribers_url":"https://api.github.com/repos/pfricker/Robots-Review/subscribers","subscription_url":"https://api.github.com/repos/pfricker/Robots-Review/subscription","commits_url":"https://api.github.com/repos/pfricker/Robots-Review/commits{/sha}","git_commits_url":"https://api.github.com/repos/pfricker/Robots-Review/git/commits{/sha}","comments_url":"https://api.github.com/repos/pfricker/Robots-Review/comments{/number}","issue_comment_url":"https://api.github.com/repos/pfricker/Robots-Review/issues/comments{/number}","contents_url":"https://api.github.com/repos/pfricker/Robots-Review/contents/{+path}","compare_url":"https://api.github.com/repos/pfricker/Robots-Review/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pfricker/Robots-Review/merges","archive_url":"https://api.github.com/repos/pfricker/Robots-Review/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pfricker/Robots-Review/downloads","issues_url":"https://api.github.com/repos/pfricker/Robots-Review/issues{/number}","pulls_url":"https://api.github.com/repos/pfricker/Robots-Review/pulls{/number}","milestones_url":"https://api.github.com/repos/pfricker/Robots-Review/milestones{/number}","notifications_url":"https://api.github.com/repos/pfricker/Robots-Review/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pfricker/Robots-Review/labels{/name}","releases_url":"https://api.github.com/repos/pfricker/Robots-Review/releases{/id}","created_at":"2015-06-29T16:05:51Z","updated_at":"2015-07-01T14:17:22Z","pushed_at":"2015-07-01T20:10:45Z","git_url":"git://github.com/pfricker/Robots-Review.git","ssh_url":"git@github.com:pfricker/Robots-Review.git","clone_url":"https://github.com/pfricker/Robots-Review.git","svn_url":"https://github.com/pfricker/Robots-Review","homepage":null,"size":3160,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"pfricker:master","ref":"master","sha":"46d67b6a26fa861633ccbe64a8135119221d92c5","user":{"login":"pfricker","id":10181571,"avatar_url":"https://avatars.githubusercontent.com/u/10181571?v=3","gravatar_id":"","url":"https://api.github.com/users/pfricker","html_url":"https://github.com/pfricker","followers_url":"https://api.github.com/users/pfricker/followers","following_url":"https://api.github.com/users/pfricker/following{/other_user}","gists_url":"https://api.github.com/users/pfricker/gists{/gist_id}","starred_url":"https://api.github.com/users/pfricker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfricker/subscriptions","organizations_url":"https://api.github.com/users/pfricker/orgs","repos_url":"https://api.github.com/users/pfricker/repos","events_url":"https://api.github.com/users/pfricker/events{/privacy}","received_events_url":"https://api.github.com/users/pfricker/received_events","type":"User","site_admin":false},"repo":{"id":38256959,"name":"Robots-Review","full_name":"pfricker/Robots-Review","owner":{"login":"pfricker","id":10181571,"avatar_url":"https://avatars.githubusercontent.com/u/10181571?v=3","gravatar_id":"","url":"https://api.github.com/users/pfricker","html_url":"https://github.com/pfricker","followers_url":"https://api.github.com/users/pfricker/followers","following_url":"https://api.github.com/users/pfricker/following{/other_user}","gists_url":"https://api.github.com/users/pfricker/gists{/gist_id}","starred_url":"https://api.github.com/users/pfricker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfricker/subscriptions","organizations_url":"https://api.github.com/users/pfricker/orgs","repos_url":"https://api.github.com/users/pfricker/repos","events_url":"https://api.github.com/users/pfricker/events{/privacy}","received_events_url":"https://api.github.com/users/pfricker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pfricker/Robots-Review","description":"","fork":false,"url":"https://api.github.com/repos/pfricker/Robots-Review","forks_url":"https://api.github.com/repos/pfricker/Robots-Review/forks","keys_url":"https://api.github.com/repos/pfricker/Robots-Review/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pfricker/Robots-Review/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pfricker/Robots-Review/teams","hooks_url":"https://api.github.com/repos/pfricker/Robots-Review/hooks","issue_events_url":"https://api.github.com/repos/pfricker/Robots-Review/issues/events{/number}","events_url":"https://api.github.com/repos/pfricker/Robots-Review/events","assignees_url":"https://api.github.com/repos/pfricker/Robots-Review/assignees{/user}","branches_url":"https://api.github.com/repos/pfricker/Robots-Review/branches{/branch}","tags_url":"https://api.github.com/repos/pfricker/Robots-Review/tags","blobs_url":"https://api.github.com/repos/pfricker/Robots-Review/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pfricker/Robots-Review/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pfricker/Robots-Review/git/refs{/sha}","trees_url":"https://api.github.com/repos/pfricker/Robots-Review/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pfricker/Robots-Review/statuses/{sha}","languages_url":"https://api.github.com/repos/pfricker/Robots-Review/languages","stargazers_url":"https://api.github.com/repos/pfricker/Robots-Review/stargazers","contributors_url":"https://api.github.com/repos/pfricker/Robots-Review/contributors","subscribers_url":"https://api.github.com/repos/pfricker/Robots-Review/subscribers","subscription_url":"https://api.github.com/repos/pfricker/Robots-Review/subscription","commits_url":"https://api.github.com/repos/pfricker/Robots-Review/commits{/sha}","git_commits_url":"https://api.github.com/repos/pfricker/Robots-Review/git/commits{/sha}","comments_url":"https://api.github.com/repos/pfricker/Robots-Review/comments{/number}","issue_comment_url":"https://api.github.com/repos/pfricker/Robots-Review/issues/comments{/number}","contents_url":"https://api.github.com/repos/pfricker/Robots-Review/contents/{+path}","compare_url":"https://api.github.com/repos/pfricker/Robots-Review/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pfricker/Robots-Review/merges","archive_url":"https://api.github.com/repos/pfricker/Robots-Review/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pfricker/Robots-Review/downloads","issues_url":"https://api.github.com/repos/pfricker/Robots-Review/issues{/number}","pulls_url":"https://api.github.com/repos/pfricker/Robots-Review/pulls{/number}","milestones_url":"https://api.github.com/repos/pfricker/Robots-Review/milestones{/number}","notifications_url":"https://api.github.com/repos/pfricker/Robots-Review/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pfricker/Robots-Review/labels{/name}","releases_url":"https://api.github.com/repos/pfricker/Robots-Review/releases{/id}","created_at":"2015-06-29T16:05:51Z","updated_at":"2015-07-01T14:17:22Z","pushed_at":"2015-07-01T20:10:45Z","git_url":"git://github.com/pfricker/Robots-Review.git","ssh_url":"git@github.com:pfricker/Robots-Review.git","clone_url":"https://github.com/pfricker/Robots-Review.git","svn_url":"https://github.com/pfricker/Robots-Review","homepage":null,"size":3160,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pfricker/Robots-Review/pulls/8"},"html":{"href":"https://github.com/pfricker/Robots-Review/pull/8"},"issue":{"href":"https://api.github.com/repos/pfricker/Robots-Review/issues/8"},"comments":{"href":"https://api.github.com/repos/pfricker/Robots-Review/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/pfricker/Robots-Review/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/pfricker/Robots-Review/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pfricker/Robots-Review/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/pfricker/Robots-Review/statuses/985b05e196b82527ed42a47b85145bcbbf9dee7e"}}}}