{"action":"created","comment":{"url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/comments/40938942","id":40938942,"diff_hunk":"@@ -0,0 +1,64 @@\n+require 'rails_helper'\n+\n+feature \"user edits review\", %(\n+  As a authorized user\n+  I want to edit the review that I've written before\n+  So I can correct any mistake\n+)do\n+\n+  scenario 'user edits review' do\n+    user = FactoryGirl.create(:user)\n+    login(user)\n+    bootcamp = FactoryGirl.create(:bootcamp, user: user)\n+    review = FactoryGirl.create(:review, bootcamp: bootcamp, user: user)\n+    visit edit_bootcamp_review_path( bootcamp, review )\n+    fill_in 'Title', with: 'Just fill them in with string'\n+    fill_in 'Body', with: 'This could be anything!'\n+    select '10', from: 'Rating'\n+    click_button 'submit'\n+\n+    expect(page).to have_content('Review successfully updated.')\n+\n+  end\n+\n+  scenario 'user tries to update review with an empty form' do\n+    user = FactoryGirl.create(:user)\n+    login(user)\n+    bootcamp = FactoryGirl.create(:bootcamp, user: user)\n+    review = FactoryGirl.create(:review, bootcamp: bootcamp, user: user)\n+\n+    visit edit_bootcamp_review_path( bootcamp, review )\n+    fill_in 'Body', with: \"\"\n+    click_button 'submit'\n+    expect(page).to have_content(\"can't be blank\")\n+  end\n+\n+  scenario 'admin edits any review' do\n+    admin = FactoryGirl.create(:user, admin: true)\n+    login(admin)\n+    user = FactoryGirl.create(:user)\n+    bootcamp = FactoryGirl.create(:bootcamp, user: user)\n+    review = FactoryGirl.create(:review, bootcamp: bootcamp, user: user)\n+\n+    visit edit_bootcamp_review_path( bootcamp, review )","path":"spec/features/review_update_spec.rb","position":43,"original_position":43,"commit_id":"4801a4de69bcab44c08f282e6d00735fb8d26a6e","original_commit_id":"4801a4de69bcab44c08f282e6d00735fb8d26a6e","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-01T17:06:01Z","updated_at":"2015-10-01T17:06:01Z","html_url":"https://github.com/MkNiz/Bootcamp-Reviews/pull/31#discussion_r40938942","pull_request_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/comments/40938942"},"html":{"href":"https://github.com/MkNiz/Bootcamp-Reviews/pull/31#discussion_r40938942"},"pull_request":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/31","id":46550200,"html_url":"https://github.com/MkNiz/Bootcamp-Reviews/pull/31","diff_url":"https://github.com/MkNiz/Bootcamp-Reviews/pull/31.diff","patch_url":"https://github.com/MkNiz/Bootcamp-Reviews/pull/31.patch","issue_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/31","number":31,"state":"open","locked":false,"title":"Fix bugs and update feature for reviews","user":{"login":"ledes","id":12192218,"avatar_url":"https://avatars.githubusercontent.com/u/12192218?v=3","gravatar_id":"","url":"https://api.github.com/users/ledes","html_url":"https://github.com/ledes","followers_url":"https://api.github.com/users/ledes/followers","following_url":"https://api.github.com/users/ledes/following{/other_user}","gists_url":"https://api.github.com/users/ledes/gists{/gist_id}","starred_url":"https://api.github.com/users/ledes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ledes/subscriptions","organizations_url":"https://api.github.com/users/ledes/orgs","repos_url":"https://api.github.com/users/ledes/repos","events_url":"https://api.github.com/users/ledes/events{/privacy}","received_events_url":"https://api.github.com/users/ledes/received_events","type":"User","site_admin":false},"body":"#New migration to:\r\n->Delete column rating from bootcamps, since we are using a method (ave_rating) to calculate it \r\n->Change column price from decimal to integer\r\n\r\n#Fixed test in order to don't use bootcamps rating\r\n#Created 'LogIn' module to refractor our tests.\r\n\r\n#Created test for edit and update review feature\r\n#Added edit, update routes for reviews\r\n#Added edit, update methods for ReviewsController\r\n#Added button to add reviews to a bootcamp\r\n#Added 'State' to the bootcamp show page.\r\n#Added styling to the flash messages\r\n","created_at":"2015-10-01T17:05:53Z","updated_at":"2015-10-01T17:06:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab4453c0b941481149da60ec5ae0f0f4d49c2a83","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/31/commits","review_comments_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/31/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/31/comments","statuses_url":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/statuses/4801a4de69bcab44c08f282e6d00735fb8d26a6e","head":{"label":"MkNiz:fixing_bugs","ref":"fixing_bugs","sha":"4801a4de69bcab44c08f282e6d00735fb8d26a6e","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-01T17:05:54Z","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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"MkNiz:master","ref":"master","sha":"ba00125cf03bde210e5bc454245e9138a917bb1b","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-01T17:05:54Z","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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/31"},"html":{"href":"https://github.com/MkNiz/Bootcamp-Reviews/pull/31"},"issue":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/31"},"comments":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/pulls/31/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/31/commits"},"statuses":{"href":"https://api.github.com/repos/MkNiz/Bootcamp-Reviews/statuses/4801a4de69bcab44c08f282e6d00735fb8d26a6e"}}}}