{"action":"created","comment":{"url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/comments/40965411","id":40965411,"diff_hunk":"@@ -16,36 +16,36 @@\n     expect(page).to have_content('🔻')\n   end\n \n-  scenario 'user can only vote when logged in' do\n+  scenario 'user that is logged in can provide one upvote or downvote', js: true do\n     user = FactoryGirl.create(:user)\n-    bootcamp = FactoryGirl.create(:bootcamp)\n-    review = FactoryGirl.create(:review, user_id: user.id,\n-                                         bootcamp_id: bootcamp.id)\n-    visit bootcamp_path(bootcamp)\n-    click_link '🔺'\n-    expect(page).to have_content(\"You need to make an account or sign in\")\n-  end\n-\n-  scenario 'user that is logged in can provide one upvote or downvote' do\n-    user = FactoryGirl.create(:user)\n-    bootcamp = FactoryGirl.create(:bootcamp)\n-    review = FactoryGirl.create(:review, user_id: user.id,\n-                                         bootcamp_id: bootcamp.id)\n-    userb = FactoryGirl.create(:user)\n+    bootcamp = FactoryGirl.create(:bootcamp, user: user)\n+    review = FactoryGirl.create(:review, user: user,\n+                                         bootcamp: bootcamp)\n     visit new_user_session_path\n-    fill_in 'Email', with: userb.email\n-    fill_in 'Password', with: userb.password\n+    fill_in 'Email', with: user.email\n+    fill_in 'Password', with: user.password\n     click_button 'Log in'\n \n     visit bootcamp_path(bootcamp)\n-    click_link '🔺'\n-    expect(page).to have_content(\"Votes: 1\")\n-    click_link '🔺'\n-    expect(page).to have_content(\"Votes: 1\")\n-    click_link '🔻'\n-    expect(page).to have_content(\"Votes: -1\")\n-    click_link '🔻'\n-    expect(page).to have_content(\"Votes: -1\")\n \n+    within(\".update-rating-#{review.id}\" ) do\n+      expect(page).to have_content(\"0\")\n+    end\n+      click_link '🔺'\n+    within(\".update-rating-#{review.id}\" ) do\n+      expect(page).to have_content(\"1\")\n+    end\n+      click_link '🔺'\n+    within(\".update-rating-#{review.id}\" ) do\n+      expect(page).to have_content(\"1\")\n+    end\n+      click_link '🔻'\n+    within(\".update-rating-#{review.id}\" ) do\n+      expect(page).to have_content(\"-1\")\n+    end\n+      click_link '🔻'\n+    within(\".update-rating-#{review.id}\" ) do","path":"spec/features/user_utilizes_voting_spec.rb","position":57,"original_position":57,"commit_id":"1e92101223f5c4aa334d3bc30d17881b0f5d9eeb","original_commit_id":"1e92101223f5c4aa334d3bc30d17881b0f5d9eeb","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Space inside parentheses detected.","created_at":"2015-10-01T20:57:52Z","updated_at":"2015-10-01T20:57:52Z","html_url":"https://github.com/MkNiz/Bootcamp-Reviews/pull/32#discussion_r40965411","pull_request_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/comments/40965411"},"html":{"href":"https://github.com/MkNiz/Bootcamp-Reviews/pull/32#discussion_r40965411"},"pull_request":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/32","id":46559854,"html_url":"https://github.com/MkNiz/Bootcamp-Reviews/pull/32","diff_url":"https://github.com/MkNiz/Bootcamp-Reviews/pull/32.diff","patch_url":"https://github.com/MkNiz/Bootcamp-Reviews/pull/32.patch","issue_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/32","number":32,"state":"open","locked":false,"title":"Vote ajax","user":{"login":"nathanielltaylor","id":12632655,"avatar_url":"https://avatars.githubusercontent.com/u/12632655?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanielltaylor","html_url":"https://github.com/nathanielltaylor","followers_url":"https://api.github.com/users/nathanielltaylor/followers","following_url":"https://api.github.com/users/nathanielltaylor/following{/other_user}","gists_url":"https://api.github.com/users/nathanielltaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanielltaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanielltaylor/subscriptions","organizations_url":"https://api.github.com/users/nathanielltaylor/orgs","repos_url":"https://api.github.com/users/nathanielltaylor/repos","events_url":"https://api.github.com/users/nathanielltaylor/events{/privacy}","received_events_url":"https://api.github.com/users/nathanielltaylor/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-01T18:34:56Z","updated_at":"2015-10-01T20:57:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/32/commits","review_comments_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/32/comments","review_comment_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/32/comments","statuses_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/statuses/1e92101223f5c4aa334d3bc30d17881b0f5d9eeb","head":{"label":"MkNiz:vote-ajax","ref":"vote-ajax","sha":"1e92101223f5c4aa334d3bc30d17881b0f5d9eeb","user":{"login":"MkNiz","id":8989267,"avatar_url":"https://avatars.githubusercontent.com/u/8989267?v=3","gravatar_id":"","url":"https://api.github.com/users/MkNiz","html_url":"https://github.com/MkNiz","followers_url":"https://api.github.com/users/MkNiz/followers","following_url":"https://api.github.com/users/MkNiz/following{/other_user}","gists_url":"https://api.github.com/users/MkNiz/gists{/gist_id}","starred_url":"https://api.github.com/users/MkNiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MkNiz/subscriptions","organizations_url":"https://api.github.com/users/MkNiz/orgs","repos_url":"https://api.github.com/users/MkNiz/repos","events_url":"https://api.github.com/users/MkNiz/events{/privacy}","received_events_url":"https://api.github.com/users/MkNiz/received_events","type":"User","site_admin":false},"repo":{"id":42871693,"name":"Bootcamp-Reviews","full_name":"MkNiz/Bootcamp-Reviews","owner":{"login":"MkNiz","id":8989267,"avatar_url":"https://avatars.githubusercontent.com/u/8989267?v=3","gravatar_id":"","url":"https://api.github.com/users/MkNiz","html_url":"https://github.com/MkNiz","followers_url":"https://api.github.com/users/MkNiz/followers","following_url":"https://api.github.com/users/MkNiz/following{/other_user}","gists_url":"https://api.github.com/users/MkNiz/gists{/gist_id}","starred_url":"https://api.github.com/users/MkNiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MkNiz/subscriptions","organizations_url":"https://api.github.com/users/MkNiz/orgs","repos_url":"https://api.github.com/users/MkNiz/repos","events_url":"https://api.github.com/users/MkNiz/events{/privacy}","received_events_url":"https://api.github.com/users/MkNiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MkNiz/Bootcamp-Reviews","description":"Group project for Launch Academy","fork":false,"url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews","forks_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/forks","keys_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/teams","hooks_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/hooks","issue_events_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/events{/number}","events_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/events","assignees_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/assignees{/user}","branches_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/branches{/branch}","tags_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/tags","blobs_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/git/refs{/sha}","trees_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/statuses/{sha}","languages_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/languages","stargazers_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/stargazers","contributors_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/contributors","subscribers_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/subscribers","subscription_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/subscription","commits_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/commits{/sha}","git_commits_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/git/commits{/sha}","comments_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/comments{/number}","issue_comment_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/comments{/number}","contents_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/contents/{+path}","compare_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/merges","archive_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/downloads","issues_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues{/number}","pulls_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls{/number}","milestones_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/milestones{/number}","notifications_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/labels{/name}","releases_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/releases{/id}","created_at":"2015-09-21T14:35:24Z","updated_at":"2015-09-22T17:46:15Z","pushed_at":"2015-10-01T20:57:46Z","git_url":"git://github.com/MkNiz/Bootcamp-Reviews.git","ssh_url":"git@github.com:MkNiz/Bootcamp-Reviews.git","clone_url":"https://github.com/MkNiz/Bootcamp-Reviews.git","svn_url":"https://github.com/MkNiz/Bootcamp-Reviews","homepage":null,"size":10708,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"MkNiz:master","ref":"master","sha":"f870f57f646f8e2c57a98f2196b498a73078b18f","user":{"login":"MkNiz","id":8989267,"avatar_url":"https://avatars.githubusercontent.com/u/8989267?v=3","gravatar_id":"","url":"https://api.github.com/users/MkNiz","html_url":"https://github.com/MkNiz","followers_url":"https://api.github.com/users/MkNiz/followers","following_url":"https://api.github.com/users/MkNiz/following{/other_user}","gists_url":"https://api.github.com/users/MkNiz/gists{/gist_id}","starred_url":"https://api.github.com/users/MkNiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MkNiz/subscriptions","organizations_url":"https://api.github.com/users/MkNiz/orgs","repos_url":"https://api.github.com/users/MkNiz/repos","events_url":"https://api.github.com/users/MkNiz/events{/privacy}","received_events_url":"https://api.github.com/users/MkNiz/received_events","type":"User","site_admin":false},"repo":{"id":42871693,"name":"Bootcamp-Reviews","full_name":"MkNiz/Bootcamp-Reviews","owner":{"login":"MkNiz","id":8989267,"avatar_url":"https://avatars.githubusercontent.com/u/8989267?v=3","gravatar_id":"","url":"https://api.github.com/users/MkNiz","html_url":"https://github.com/MkNiz","followers_url":"https://api.github.com/users/MkNiz/followers","following_url":"https://api.github.com/users/MkNiz/following{/other_user}","gists_url":"https://api.github.com/users/MkNiz/gists{/gist_id}","starred_url":"https://api.github.com/users/MkNiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MkNiz/subscriptions","organizations_url":"https://api.github.com/users/MkNiz/orgs","repos_url":"https://api.github.com/users/MkNiz/repos","events_url":"https://api.github.com/users/MkNiz/events{/privacy}","received_events_url":"https://api.github.com/users/MkNiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MkNiz/Bootcamp-Reviews","description":"Group project for Launch Academy","fork":false,"url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews","forks_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/forks","keys_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/teams","hooks_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/hooks","issue_events_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/events{/number}","events_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/events","assignees_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/assignees{/user}","branches_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/branches{/branch}","tags_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/tags","blobs_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/git/refs{/sha}","trees_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/statuses/{sha}","languages_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/languages","stargazers_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/stargazers","contributors_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/contributors","subscribers_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/subscribers","subscription_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/subscription","commits_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/commits{/sha}","git_commits_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/git/commits{/sha}","comments_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/comments{/number}","issue_comment_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/comments{/number}","contents_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/contents/{+path}","compare_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/merges","archive_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/downloads","issues_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues{/number}","pulls_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls{/number}","milestones_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/milestones{/number}","notifications_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/labels{/name}","releases_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/releases{/id}","created_at":"2015-09-21T14:35:24Z","updated_at":"2015-09-22T17:46:15Z","pushed_at":"2015-10-01T20:57:46Z","git_url":"git://github.com/MkNiz/Bootcamp-Reviews.git","ssh_url":"git@github.com:MkNiz/Bootcamp-Reviews.git","clone_url":"https://github.com/MkNiz/Bootcamp-Reviews.git","svn_url":"https://github.com/MkNiz/Bootcamp-Reviews","homepage":null,"size":10708,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/32"},"html":{"href":"https://github.com/MkNiz/Bootcamp-Reviews/pull/32"},"issue":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/32"},"comments":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/statuses/1e92101223f5c4aa334d3bc30d17881b0f5d9eeb"}}}}