{"action":"created","comment":{"url":"https://api.github.com/repos/hailexiao/metayelp/pulls/comments/40920662","id":40920662,"diff_hunk":"@@ -1,93 +1,121 @@\n-require 'rails_helper'\n-\n-feature 'user can vote on reviews', %{\n-  As a reviewer of Yelpers\n-  I want to vote on reviews of yelpers\n-  So I can let people know which yelper reviewers are\n-  the best at yelp reviewing.\n-} do\n-  # Acceptance criteria\n-  # [*] When an unauthenticated user tries to vote, they cannot.\n-  # [*] When an authenticated user upvotes, the review's upvotes goes up 1.\n-  # [*] When an authenticated user downvotes, the review's downvotes goes down 1\n-  # [*] Users can only vote once per review.\n-  let!(:review) { FactoryGirl.create(:review) }\n-  let!(:yelper) { review.yelper }\n-  let!(:user) { review.user }\n-  let!(:upvotes) { FactoryGirl.create_list(:upvote, 10, review: review) }\n-\n-  context \"unauthenticated user\" do\n-    scenario 'an unauthenticated user tries to vote', js: true do\n-      visit yelper_path(yelper)\n-\n-      expect(page).to have_content '10'\n-\n-      within(\".votes\") do\n-        find('#up-vote').trigger('click')\n-      end\n-\n-      expect(page).to have_content '10'\n-    end\n-  end\n-\n-  scenario \"signed in user upvotes,review's upvotes goes up 1\", js: true do\n-\n-    sign_in_as(user)\n-\n-    visit yelper_path(yelper)\n-\n-    within(\".votes\") do\n-      find('#up-vote').trigger('click')\n-    end\n-\n-    expect(page).to have_content(\"11\")\n-  end\n-\n-  scenario \"signed in user downvotes, review's downvotes go down 1\", js: true do\n-    sign_in_as(user)\n-    visit yelper_path(yelper)\n-\n-    within(\".votes\") do\n-      find('#down-vote').trigger('click')\n-    end\n-\n-    expect(page).to have_content(\"1\")\n-  end\n-\n-  scenario \"signed in user tries to vote twice on the same review\", js: true do\n-\n-    sign_in_as(user)\n-    visit yelper_path(yelper)\n-\n-    within(\".votes\") do\n-      find('#up-vote').trigger('click')\n-    end\n-\n-    expect(page).to have_content(\"1\")\n-\n-    within(\".votes\") do\n-      find('#up-vote').trigger('click')\n-    end\n-\n-    expect(page).to have_content(\"1\")\n-  end\n-\n-  scenario \"an authenticated upvotes then downvotes\", js: true do\n-\n-    sign_in_as(user)\n-    visit yelper_path(yelper)\n-\n-    within(\".votes\") do\n-      find('#up-vote').trigger('click')\n-    end\n-\n-    expect(page).to have_content(\"11\")\n-\n-    within(\".votes\") do\n-      find('#down-vote').trigger('click')\n-    end\n-\n-    expect(page).to have_content(\"1\")\n-    expect(page).to have_content(\"10\")\n-  end\n-end\n+# require 'rails_helper'\n+#\n+# feature 'user can vote on reviews', %{\n+#   As a reviewer of Yelpers\n+#   I want to vote on reviews of yelpers\n+#   So I can let people know which yelper reviewers are\n+#   the best at yelp reviewing.\n+# } do\n+#   # Acceptance criteria\n+#   # [*] When an unauthenticated user tries to vote, they cannot.\n+#   # [*] When an authenticated user upvotes, the review's upvotes goes up 1.\n+#   # [*] When an authenticated user downvotes, the review's downvotes goes down 1","path":"spec/features/user_votes_spec.rb","position":105,"original_position":105,"commit_id":"4b13183f7a240a2396c7fdd706306b4512621ccb","original_commit_id":"4b13183f7a240a2396c7fdd706306b4512621ccb","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":"Line is too long. [82/80]","created_at":"2015-10-01T14:39:58Z","updated_at":"2015-10-01T14:39:58Z","html_url":"https://github.com/hailexiao/metayelp/pull/20#discussion_r40920662","pull_request_url":"https://api.github.com/repos/hailexiao/metayelp/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/hailexiao/metayelp/pulls/comments/40920662"},"html":{"href":"https://github.com/hailexiao/metayelp/pull/20#discussion_r40920662"},"pull_request":{"href":"https://api.github.com/repos/hailexiao/metayelp/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/hailexiao/metayelp/pulls/20","id":46414514,"html_url":"https://github.com/hailexiao/metayelp/pull/20","diff_url":"https://github.com/hailexiao/metayelp/pull/20.diff","patch_url":"https://github.com/hailexiao/metayelp/pull/20.patch","issue_url":"https://api.github.com/repos/hailexiao/metayelp/issues/20","number":20,"state":"open","locked":false,"title":"Edit review","user":{"login":"brendanboyle87","id":1395328,"avatar_url":"https://avatars.githubusercontent.com/u/1395328?v=3","gravatar_id":"","url":"https://api.github.com/users/brendanboyle87","html_url":"https://github.com/brendanboyle87","followers_url":"https://api.github.com/users/brendanboyle87/followers","following_url":"https://api.github.com/users/brendanboyle87/following{/other_user}","gists_url":"https://api.github.com/users/brendanboyle87/gists{/gist_id}","starred_url":"https://api.github.com/users/brendanboyle87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendanboyle87/subscriptions","organizations_url":"https://api.github.com/users/brendanboyle87/orgs","repos_url":"https://api.github.com/users/brendanboyle87/repos","events_url":"https://api.github.com/users/brendanboyle87/events{/privacy}","received_events_url":"https://api.github.com/users/brendanboyle87/received_events","type":"User","site_admin":false},"body":"Added update route and update method to the review controller. Wrote feature tests confirming users can only edit their own reviews. Also gave admins ability to edit reviews and wrote a feature tests to check that functionality. ","created_at":"2015-09-30T15:10:49Z","updated_at":"2015-10-01T14:39:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db42dad39655cc1c561fe73719ceea89f5cbbac7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hailexiao/metayelp/pulls/20/commits","review_comments_url":"https://api.github.com/repos/hailexiao/metayelp/pulls/20/comments","review_comment_url":"https://api.github.com/repos/hailexiao/metayelp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hailexiao/metayelp/issues/20/comments","statuses_url":"https://api.github.com/repos/hailexiao/metayelp/statuses/4b13183f7a240a2396c7fdd706306b4512621ccb","head":{"label":"hailexiao:edit-review","ref":"edit-review","sha":"4b13183f7a240a2396c7fdd706306b4512621ccb","user":{"login":"hailexiao","id":10236227,"avatar_url":"https://avatars.githubusercontent.com/u/10236227?v=3","gravatar_id":"","url":"https://api.github.com/users/hailexiao","html_url":"https://github.com/hailexiao","followers_url":"https://api.github.com/users/hailexiao/followers","following_url":"https://api.github.com/users/hailexiao/following{/other_user}","gists_url":"https://api.github.com/users/hailexiao/gists{/gist_id}","starred_url":"https://api.github.com/users/hailexiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hailexiao/subscriptions","organizations_url":"https://api.github.com/users/hailexiao/orgs","repos_url":"https://api.github.com/users/hailexiao/repos","events_url":"https://api.github.com/users/hailexiao/events{/privacy}","received_events_url":"https://api.github.com/users/hailexiao/received_events","type":"User","site_admin":false},"repo":{"id":42876313,"name":"metayelp","full_name":"hailexiao/metayelp","owner":{"login":"hailexiao","id":10236227,"avatar_url":"https://avatars.githubusercontent.com/u/10236227?v=3","gravatar_id":"","url":"https://api.github.com/users/hailexiao","html_url":"https://github.com/hailexiao","followers_url":"https://api.github.com/users/hailexiao/followers","following_url":"https://api.github.com/users/hailexiao/following{/other_user}","gists_url":"https://api.github.com/users/hailexiao/gists{/gist_id}","starred_url":"https://api.github.com/users/hailexiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hailexiao/subscriptions","organizations_url":"https://api.github.com/users/hailexiao/orgs","repos_url":"https://api.github.com/users/hailexiao/repos","events_url":"https://api.github.com/users/hailexiao/events{/privacy}","received_events_url":"https://api.github.com/users/hailexiao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hailexiao/metayelp","description":"A web application for reviewing Yelpers","fork":false,"url":"https://api.github.com/repos/hailexiao/metayelp","forks_url":"https://api.github.com/repos/hailexiao/metayelp/forks","keys_url":"https://api.github.com/repos/hailexiao/metayelp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hailexiao/metayelp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hailexiao/metayelp/teams","hooks_url":"https://api.github.com/repos/hailexiao/metayelp/hooks","issue_events_url":"https://api.github.com/repos/hailexiao/metayelp/issues/events{/number}","events_url":"https://api.github.com/repos/hailexiao/metayelp/events","assignees_url":"https://api.github.com/repos/hailexiao/metayelp/assignees{/user}","branches_url":"https://api.github.com/repos/hailexiao/metayelp/branches{/branch}","tags_url":"https://api.github.com/repos/hailexiao/metayelp/tags","blobs_url":"https://api.github.com/repos/hailexiao/metayelp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hailexiao/metayelp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hailexiao/metayelp/git/refs{/sha}","trees_url":"https://api.github.com/repos/hailexiao/metayelp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hailexiao/metayelp/statuses/{sha}","languages_url":"https://api.github.com/repos/hailexiao/metayelp/languages","stargazers_url":"https://api.github.com/repos/hailexiao/metayelp/stargazers","contributors_url":"https://api.github.com/repos/hailexiao/metayelp/contributors","subscribers_url":"https://api.github.com/repos/hailexiao/metayelp/subscribers","subscription_url":"https://api.github.com/repos/hailexiao/metayelp/subscription","commits_url":"https://api.github.com/repos/hailexiao/metayelp/commits{/sha}","git_commits_url":"https://api.github.com/repos/hailexiao/metayelp/git/commits{/sha}","comments_url":"https://api.github.com/repos/hailexiao/metayelp/comments{/number}","issue_comment_url":"https://api.github.com/repos/hailexiao/metayelp/issues/comments{/number}","contents_url":"https://api.github.com/repos/hailexiao/metayelp/contents/{+path}","compare_url":"https://api.github.com/repos/hailexiao/metayelp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hailexiao/metayelp/merges","archive_url":"https://api.github.com/repos/hailexiao/metayelp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hailexiao/metayelp/downloads","issues_url":"https://api.github.com/repos/hailexiao/metayelp/issues{/number}","pulls_url":"https://api.github.com/repos/hailexiao/metayelp/pulls{/number}","milestones_url":"https://api.github.com/repos/hailexiao/metayelp/milestones{/number}","notifications_url":"https://api.github.com/repos/hailexiao/metayelp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hailexiao/metayelp/labels{/name}","releases_url":"https://api.github.com/repos/hailexiao/metayelp/releases{/id}","created_at":"2015-09-21T15:47:45Z","updated_at":"2015-09-23T18:55:38Z","pushed_at":"2015-10-01T14:39:53Z","git_url":"git://github.com/hailexiao/metayelp.git","ssh_url":"git@github.com:hailexiao/metayelp.git","clone_url":"https://github.com/hailexiao/metayelp.git","svn_url":"https://github.com/hailexiao/metayelp","homepage":null,"size":1404,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"hailexiao:master","ref":"master","sha":"22b9a1a65e2af94e1427136aea41d65a14a026c5","user":{"login":"hailexiao","id":10236227,"avatar_url":"https://avatars.githubusercontent.com/u/10236227?v=3","gravatar_id":"","url":"https://api.github.com/users/hailexiao","html_url":"https://github.com/hailexiao","followers_url":"https://api.github.com/users/hailexiao/followers","following_url":"https://api.github.com/users/hailexiao/following{/other_user}","gists_url":"https://api.github.com/users/hailexiao/gists{/gist_id}","starred_url":"https://api.github.com/users/hailexiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hailexiao/subscriptions","organizations_url":"https://api.github.com/users/hailexiao/orgs","repos_url":"https://api.github.com/users/hailexiao/repos","events_url":"https://api.github.com/users/hailexiao/events{/privacy}","received_events_url":"https://api.github.com/users/hailexiao/received_events","type":"User","site_admin":false},"repo":{"id":42876313,"name":"metayelp","full_name":"hailexiao/metayelp","owner":{"login":"hailexiao","id":10236227,"avatar_url":"https://avatars.githubusercontent.com/u/10236227?v=3","gravatar_id":"","url":"https://api.github.com/users/hailexiao","html_url":"https://github.com/hailexiao","followers_url":"https://api.github.com/users/hailexiao/followers","following_url":"https://api.github.com/users/hailexiao/following{/other_user}","gists_url":"https://api.github.com/users/hailexiao/gists{/gist_id}","starred_url":"https://api.github.com/users/hailexiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hailexiao/subscriptions","organizations_url":"https://api.github.com/users/hailexiao/orgs","repos_url":"https://api.github.com/users/hailexiao/repos","events_url":"https://api.github.com/users/hailexiao/events{/privacy}","received_events_url":"https://api.github.com/users/hailexiao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hailexiao/metayelp","description":"A web application for reviewing Yelpers","fork":false,"url":"https://api.github.com/repos/hailexiao/metayelp","forks_url":"https://api.github.com/repos/hailexiao/metayelp/forks","keys_url":"https://api.github.com/repos/hailexiao/metayelp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hailexiao/metayelp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hailexiao/metayelp/teams","hooks_url":"https://api.github.com/repos/hailexiao/metayelp/hooks","issue_events_url":"https://api.github.com/repos/hailexiao/metayelp/issues/events{/number}","events_url":"https://api.github.com/repos/hailexiao/metayelp/events","assignees_url":"https://api.github.com/repos/hailexiao/metayelp/assignees{/user}","branches_url":"https://api.github.com/repos/hailexiao/metayelp/branches{/branch}","tags_url":"https://api.github.com/repos/hailexiao/metayelp/tags","blobs_url":"https://api.github.com/repos/hailexiao/metayelp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hailexiao/metayelp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hailexiao/metayelp/git/refs{/sha}","trees_url":"https://api.github.com/repos/hailexiao/metayelp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hailexiao/metayelp/statuses/{sha}","languages_url":"https://api.github.com/repos/hailexiao/metayelp/languages","stargazers_url":"https://api.github.com/repos/hailexiao/metayelp/stargazers","contributors_url":"https://api.github.com/repos/hailexiao/metayelp/contributors","subscribers_url":"https://api.github.com/repos/hailexiao/metayelp/subscribers","subscription_url":"https://api.github.com/repos/hailexiao/metayelp/subscription","commits_url":"https://api.github.com/repos/hailexiao/metayelp/commits{/sha}","git_commits_url":"https://api.github.com/repos/hailexiao/metayelp/git/commits{/sha}","comments_url":"https://api.github.com/repos/hailexiao/metayelp/comments{/number}","issue_comment_url":"https://api.github.com/repos/hailexiao/metayelp/issues/comments{/number}","contents_url":"https://api.github.com/repos/hailexiao/metayelp/contents/{+path}","compare_url":"https://api.github.com/repos/hailexiao/metayelp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hailexiao/metayelp/merges","archive_url":"https://api.github.com/repos/hailexiao/metayelp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hailexiao/metayelp/downloads","issues_url":"https://api.github.com/repos/hailexiao/metayelp/issues{/number}","pulls_url":"https://api.github.com/repos/hailexiao/metayelp/pulls{/number}","milestones_url":"https://api.github.com/repos/hailexiao/metayelp/milestones{/number}","notifications_url":"https://api.github.com/repos/hailexiao/metayelp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hailexiao/metayelp/labels{/name}","releases_url":"https://api.github.com/repos/hailexiao/metayelp/releases{/id}","created_at":"2015-09-21T15:47:45Z","updated_at":"2015-09-23T18:55:38Z","pushed_at":"2015-10-01T14:39:53Z","git_url":"git://github.com/hailexiao/metayelp.git","ssh_url":"git@github.com:hailexiao/metayelp.git","clone_url":"https://github.com/hailexiao/metayelp.git","svn_url":"https://github.com/hailexiao/metayelp","homepage":null,"size":1404,"stargazers_count":0,"watchers_count":0,"language":"HTML","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/hailexiao/metayelp/pulls/20"},"html":{"href":"https://github.com/hailexiao/metayelp/pull/20"},"issue":{"href":"https://api.github.com/repos/hailexiao/metayelp/issues/20"},"comments":{"href":"https://api.github.com/repos/hailexiao/metayelp/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/hailexiao/metayelp/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/hailexiao/metayelp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hailexiao/metayelp/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/hailexiao/metayelp/statuses/4b13183f7a240a2396c7fdd706306b4512621ccb"}}}}