{"action":"created","comment":{"url":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/comments/27801264","id":27801264,"diff_hunk":"@@ -0,0 +1,62 @@\n+require 'rails_helper'\n+require 'helpers'\n+\n+feature 'user can vote on reviews' do\n+  let(:user) { FactoryGirl.create(:user) }\n+  let(:game) {FactoryGirl.create(:game) }\n+\n+  scenario 'upvotes and downvotes exist' do\n+    sign_in_as(user)\n+    make_review_for_game(game)\n+    new_review = Review.find_by(body: \"something something something\")\n+    page.find(\"#up-#{new_review.id}\")\n+    page.find(\"#down-#{new_review.id}\")\n+    within \"#vote_#{new_review.id}\" do\n+      expect(page).to have_content(\"0\")\n+    end\n+  end\n+\n+  pending 'user un-upvotes a review' do\n+    sign_in_as(user)\n+    visit game_path(review.game)\n+    within '.vote-arrows' do\n+      find(\".fi-arrow-up\").click\n+      save_and_open_page\n+      expect(page).to have_content(\"1\")\n+      find(\".fi-arrow-up\").click\n+      expect(page).to have_content(\"0\")\n+    end\n+  end\n+\n+  pending 'user downvotes a review' do\n+    sign_in_as(user)\n+    visit game_path(review.game)\n+    within '.vote-arrows' do\n+      find(\".fi-arrow-down\").click\n+      expect(page).to have_content(\"-1\")\n+    end\n+  end\n+\n+  pending 'user upvotes a review' do\n+    sign_in_as(user)\n+    visit game_path(review.game)\n+    within '.vote-arrows' do\n+      find(\".fi-arrow-down\").click\n+      expect(page).to have_content(\"-1\")\n+      find(\".fi-arrow-down\").click\n+      expect(page).to have_content(\"0\")\n+    end\n+  end\n+\n+  pending 'user reverses a vote' do\n+    sign_in_as(user)\n+    visit game_path(review.game)\n+    within '.vote-arrows' do\n+      find(\".fi-arrow-up\").click\n+      expect(page).to have_content(\"1\")\n+      find(\".fi-arrow-down\").click\n+      expect(page).to have_content(\"-1\")\n+    end\n+  end\n+end\n+","path":"spec/features/user_can_upvote_review_spec.rb","position":62,"original_position":62,"commit_id":"b2ec01316a3d82032d2acbcc26d4c5a5856d7d8b","original_commit_id":"b2ec01316a3d82032d2acbcc26d4c5a5856d7d8b","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":"1 trailing blank lines detected.","created_at":"2015-04-06T14:48:45Z","updated_at":"2015-04-06T14:48:45Z","html_url":"https://github.com/SensitiveLion/cardboard/pull/21#discussion_r27801264","pull_request_url":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/comments/27801264"},"html":{"href":"https://github.com/SensitiveLion/cardboard/pull/21#discussion_r27801264"},"pull_request":{"href":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/21","id":32682631,"html_url":"https://github.com/SensitiveLion/cardboard/pull/21","diff_url":"https://github.com/SensitiveLion/cardboard/pull/21.diff","patch_url":"https://github.com/SensitiveLion/cardboard/pull/21.patch","issue_url":"https://api.github.com/repos/SensitiveLion/cardboard/issues/21","number":21,"state":"open","locked":false,"title":"RFR Km upvotes","user":{"login":"MatthewRiggott","id":9540829,"avatar_url":"https://avatars.githubusercontent.com/u/9540829?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewRiggott","html_url":"https://github.com/MatthewRiggott","followers_url":"https://api.github.com/users/MatthewRiggott/followers","following_url":"https://api.github.com/users/MatthewRiggott/following{/other_user}","gists_url":"https://api.github.com/users/MatthewRiggott/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewRiggott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewRiggott/subscriptions","organizations_url":"https://api.github.com/users/MatthewRiggott/orgs","repos_url":"https://api.github.com/users/MatthewRiggott/repos","events_url":"https://api.github.com/users/MatthewRiggott/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewRiggott/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-06T14:43:17Z","updated_at":"2015-04-06T14:48:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/21/commits","review_comments_url":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/21/comments","review_comment_url":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SensitiveLion/cardboard/issues/21/comments","statuses_url":"https://api.github.com/repos/SensitiveLion/cardboard/statuses/b2ec01316a3d82032d2acbcc26d4c5a5856d7d8b","head":{"label":"SensitiveLion:KMUpvotes","ref":"KMUpvotes","sha":"b2ec01316a3d82032d2acbcc26d4c5a5856d7d8b","user":{"login":"SensitiveLion","id":7864707,"avatar_url":"https://avatars.githubusercontent.com/u/7864707?v=3","gravatar_id":"","url":"https://api.github.com/users/SensitiveLion","html_url":"https://github.com/SensitiveLion","followers_url":"https://api.github.com/users/SensitiveLion/followers","following_url":"https://api.github.com/users/SensitiveLion/following{/other_user}","gists_url":"https://api.github.com/users/SensitiveLion/gists{/gist_id}","starred_url":"https://api.github.com/users/SensitiveLion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SensitiveLion/subscriptions","organizations_url":"https://api.github.com/users/SensitiveLion/orgs","repos_url":"https://api.github.com/users/SensitiveLion/repos","events_url":"https://api.github.com/users/SensitiveLion/events{/privacy}","received_events_url":"https://api.github.com/users/SensitiveLion/received_events","type":"User","site_admin":false},"repo":{"id":33131973,"name":"cardboard","full_name":"SensitiveLion/cardboard","owner":{"login":"SensitiveLion","id":7864707,"avatar_url":"https://avatars.githubusercontent.com/u/7864707?v=3","gravatar_id":"","url":"https://api.github.com/users/SensitiveLion","html_url":"https://github.com/SensitiveLion","followers_url":"https://api.github.com/users/SensitiveLion/followers","following_url":"https://api.github.com/users/SensitiveLion/following{/other_user}","gists_url":"https://api.github.com/users/SensitiveLion/gists{/gist_id}","starred_url":"https://api.github.com/users/SensitiveLion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SensitiveLion/subscriptions","organizations_url":"https://api.github.com/users/SensitiveLion/orgs","repos_url":"https://api.github.com/users/SensitiveLion/repos","events_url":"https://api.github.com/users/SensitiveLion/events{/privacy}","received_events_url":"https://api.github.com/users/SensitiveLion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SensitiveLion/cardboard","description":"","fork":false,"url":"https://api.github.com/repos/SensitiveLion/cardboard","forks_url":"https://api.github.com/repos/SensitiveLion/cardboard/forks","keys_url":"https://api.github.com/repos/SensitiveLion/cardboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SensitiveLion/cardboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SensitiveLion/cardboard/teams","hooks_url":"https://api.github.com/repos/SensitiveLion/cardboard/hooks","issue_events_url":"https://api.github.com/repos/SensitiveLion/cardboard/issues/events{/number}","events_url":"https://api.github.com/repos/SensitiveLion/cardboard/events","assignees_url":"https://api.github.com/repos/SensitiveLion/cardboard/assignees{/user}","branches_url":"https://api.github.com/repos/SensitiveLion/cardboard/branches{/branch}","tags_url":"https://api.github.com/repos/SensitiveLion/cardboard/tags","blobs_url":"https://api.github.com/repos/SensitiveLion/cardboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SensitiveLion/cardboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SensitiveLion/cardboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/SensitiveLion/cardboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SensitiveLion/cardboard/statuses/{sha}","languages_url":"https://api.github.com/repos/SensitiveLion/cardboard/languages","stargazers_url":"https://api.github.com/repos/SensitiveLion/cardboard/stargazers","contributors_url":"https://api.github.com/repos/SensitiveLion/cardboard/contributors","subscribers_url":"https://api.github.com/repos/SensitiveLion/cardboard/subscribers","subscription_url":"https://api.github.com/repos/SensitiveLion/cardboard/subscription","commits_url":"https://api.github.com/repos/SensitiveLion/cardboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/SensitiveLion/cardboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/SensitiveLion/cardboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/SensitiveLion/cardboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/SensitiveLion/cardboard/contents/{+path}","compare_url":"https://api.github.com/repos/SensitiveLion/cardboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SensitiveLion/cardboard/merges","archive_url":"https://api.github.com/repos/SensitiveLion/cardboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SensitiveLion/cardboard/downloads","issues_url":"https://api.github.com/repos/SensitiveLion/cardboard/issues{/number}","pulls_url":"https://api.github.com/repos/SensitiveLion/cardboard/pulls{/number}","milestones_url":"https://api.github.com/repos/SensitiveLion/cardboard/milestones{/number}","notifications_url":"https://api.github.com/repos/SensitiveLion/cardboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SensitiveLion/cardboard/labels{/name}","releases_url":"https://api.github.com/repos/SensitiveLion/cardboard/releases{/id}","created_at":"2015-03-30T15:39:36Z","updated_at":"2015-04-06T13:31:39Z","pushed_at":"2015-04-06T14:48:39Z","git_url":"git://github.com/SensitiveLion/cardboard.git","ssh_url":"git@github.com:SensitiveLion/cardboard.git","clone_url":"https://github.com/SensitiveLion/cardboard.git","svn_url":"https://github.com/SensitiveLion/cardboard","homepage":null,"size":796,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"SensitiveLion:master","ref":"master","sha":"1d30741c88c86c1a827672522708d214e158f5a5","user":{"login":"SensitiveLion","id":7864707,"avatar_url":"https://avatars.githubusercontent.com/u/7864707?v=3","gravatar_id":"","url":"https://api.github.com/users/SensitiveLion","html_url":"https://github.com/SensitiveLion","followers_url":"https://api.github.com/users/SensitiveLion/followers","following_url":"https://api.github.com/users/SensitiveLion/following{/other_user}","gists_url":"https://api.github.com/users/SensitiveLion/gists{/gist_id}","starred_url":"https://api.github.com/users/SensitiveLion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SensitiveLion/subscriptions","organizations_url":"https://api.github.com/users/SensitiveLion/orgs","repos_url":"https://api.github.com/users/SensitiveLion/repos","events_url":"https://api.github.com/users/SensitiveLion/events{/privacy}","received_events_url":"https://api.github.com/users/SensitiveLion/received_events","type":"User","site_admin":false},"repo":{"id":33131973,"name":"cardboard","full_name":"SensitiveLion/cardboard","owner":{"login":"SensitiveLion","id":7864707,"avatar_url":"https://avatars.githubusercontent.com/u/7864707?v=3","gravatar_id":"","url":"https://api.github.com/users/SensitiveLion","html_url":"https://github.com/SensitiveLion","followers_url":"https://api.github.com/users/SensitiveLion/followers","following_url":"https://api.github.com/users/SensitiveLion/following{/other_user}","gists_url":"https://api.github.com/users/SensitiveLion/gists{/gist_id}","starred_url":"https://api.github.com/users/SensitiveLion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SensitiveLion/subscriptions","organizations_url":"https://api.github.com/users/SensitiveLion/orgs","repos_url":"https://api.github.com/users/SensitiveLion/repos","events_url":"https://api.github.com/users/SensitiveLion/events{/privacy}","received_events_url":"https://api.github.com/users/SensitiveLion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SensitiveLion/cardboard","description":"","fork":false,"url":"https://api.github.com/repos/SensitiveLion/cardboard","forks_url":"https://api.github.com/repos/SensitiveLion/cardboard/forks","keys_url":"https://api.github.com/repos/SensitiveLion/cardboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SensitiveLion/cardboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SensitiveLion/cardboard/teams","hooks_url":"https://api.github.com/repos/SensitiveLion/cardboard/hooks","issue_events_url":"https://api.github.com/repos/SensitiveLion/cardboard/issues/events{/number}","events_url":"https://api.github.com/repos/SensitiveLion/cardboard/events","assignees_url":"https://api.github.com/repos/SensitiveLion/cardboard/assignees{/user}","branches_url":"https://api.github.com/repos/SensitiveLion/cardboard/branches{/branch}","tags_url":"https://api.github.com/repos/SensitiveLion/cardboard/tags","blobs_url":"https://api.github.com/repos/SensitiveLion/cardboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SensitiveLion/cardboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SensitiveLion/cardboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/SensitiveLion/cardboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SensitiveLion/cardboard/statuses/{sha}","languages_url":"https://api.github.com/repos/SensitiveLion/cardboard/languages","stargazers_url":"https://api.github.com/repos/SensitiveLion/cardboard/stargazers","contributors_url":"https://api.github.com/repos/SensitiveLion/cardboard/contributors","subscribers_url":"https://api.github.com/repos/SensitiveLion/cardboard/subscribers","subscription_url":"https://api.github.com/repos/SensitiveLion/cardboard/subscription","commits_url":"https://api.github.com/repos/SensitiveLion/cardboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/SensitiveLion/cardboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/SensitiveLion/cardboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/SensitiveLion/cardboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/SensitiveLion/cardboard/contents/{+path}","compare_url":"https://api.github.com/repos/SensitiveLion/cardboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SensitiveLion/cardboard/merges","archive_url":"https://api.github.com/repos/SensitiveLion/cardboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SensitiveLion/cardboard/downloads","issues_url":"https://api.github.com/repos/SensitiveLion/cardboard/issues{/number}","pulls_url":"https://api.github.com/repos/SensitiveLion/cardboard/pulls{/number}","milestones_url":"https://api.github.com/repos/SensitiveLion/cardboard/milestones{/number}","notifications_url":"https://api.github.com/repos/SensitiveLion/cardboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SensitiveLion/cardboard/labels{/name}","releases_url":"https://api.github.com/repos/SensitiveLion/cardboard/releases{/id}","created_at":"2015-03-30T15:39:36Z","updated_at":"2015-04-06T13:31:39Z","pushed_at":"2015-04-06T14:48:39Z","git_url":"git://github.com/SensitiveLion/cardboard.git","ssh_url":"git@github.com:SensitiveLion/cardboard.git","clone_url":"https://github.com/SensitiveLion/cardboard.git","svn_url":"https://github.com/SensitiveLion/cardboard","homepage":null,"size":796,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/21"},"html":{"href":"https://github.com/SensitiveLion/cardboard/pull/21"},"issue":{"href":"https://api.github.com/repos/SensitiveLion/cardboard/issues/21"},"comments":{"href":"https://api.github.com/repos/SensitiveLion/cardboard/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SensitiveLion/cardboard/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/SensitiveLion/cardboard/statuses/b2ec01316a3d82032d2acbcc26d4c5a5856d7d8b"}}}}