{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/comments/35964031","id":35964031,"diff_hunk":"@@ -0,0 +1,63 @@\n+require 'rails_helper'\n+\n+feature 'commenting' do\n+  before do \n+    @user = User.create username: 'fake', email: 'fake@gmail.com', password: '12345678', password_confirmation: '12345678'\n+    login_as @user\n+    add_photo  \n+    @user2 = User.create username: 'fake2', email: 'fake2@gmail.com', password: '12345678', password_confirmation: '12345678'\n+  end\n+\n+  scenario 'allow users to leave comments using a form' do\n+     visit '/'\n+     login_as @user\n+     click_link 'Comment'\n+     fill_in 'Leave a comment', with: 'GRUMPY CAT!!'\n+     click_button 'Submit'\n+     expect(current_path).to eq '/'\n+     expect(page).to have_content('GRUMPY CAT!!')\n+  end\n+  \n+  scenario 'does not allow non-users to leave comments' do\n+     click_link 'Sign out'\n+     visit '/'\n+     click_link 'Comment'\n+     expect(current_path).to eq '/users/sign_in'\n+     expect(page).to have_content('You need to sign in or sign up before continuing')\n+  end\n+  \n+  scenario 'viewing comments on photo page' do\n+    login_as @user\n+    add_comment\n+    click_link 'Grumpy cat'\n+    expect(page).to have_content('GRUMPY CAT!!')\n+  end\n+  \n+  scenario 'comments get deleted with the photo ' do\n+    login_as @user\n+    add_comment\n+    click_link 'Grumpy cat'\n+    click_link 'Delete photo'\n+    expect(page).not_to have_content 'GRUMPY CAT!!'\n+  end\n+  \n+  xcontext 'deleting comments' do\n+    before do \n+      login_as @user2\n+      add_comment\n+    end\n+    \n+    scenario 'removes comment when it is deleted only by the user added it' do\n+      visit '/'","path":"spec/features/comments_feature_spec.rb","position":51,"original_position":51,"commit_id":"61c6ec7db1282b8adc903f0eda8ead8668500176","original_commit_id":"61c6ec7db1282b8adc903f0eda8ead8668500176","user":{"login":"ptolemybarnes","id":9342866,"avatar_url":"https://avatars.githubusercontent.com/u/9342866?v=3","gravatar_id":"","url":"https://api.github.com/users/ptolemybarnes","html_url":"https://github.com/ptolemybarnes","followers_url":"https://api.github.com/users/ptolemybarnes/followers","following_url":"https://api.github.com/users/ptolemybarnes/following{/other_user}","gists_url":"https://api.github.com/users/ptolemybarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/ptolemybarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptolemybarnes/subscriptions","organizations_url":"https://api.github.com/users/ptolemybarnes/orgs","repos_url":"https://api.github.com/users/ptolemybarnes/repos","events_url":"https://api.github.com/users/ptolemybarnes/events{/privacy}","received_events_url":"https://api.github.com/users/ptolemybarnes/received_events","type":"User","site_admin":false},"body":"Move this to before block too","created_at":"2015-07-31T10:53:30Z","updated_at":"2015-07-31T10:53:30Z","html_url":"https://github.com/makersacademy/instagram-challenge/pull/53#discussion_r35964031","pull_request_url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/comments/35964031"},"html":{"href":"https://github.com/makersacademy/instagram-challenge/pull/53#discussion_r35964031"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/53","id":40860248,"html_url":"https://github.com/makersacademy/instagram-challenge/pull/53","diff_url":"https://github.com/makersacademy/instagram-challenge/pull/53.diff","patch_url":"https://github.com/makersacademy/instagram-challenge/pull/53.patch","issue_url":"https://api.github.com/repos/makersacademy/instagram-challenge/issues/53","number":53,"state":"open","locked":false,"title":"instagram-challenge","user":{"login":"zdajani","id":9772849,"avatar_url":"https://avatars.githubusercontent.com/u/9772849?v=3","gravatar_id":"","url":"https://api.github.com/users/zdajani","html_url":"https://github.com/zdajani","followers_url":"https://api.github.com/users/zdajani/followers","following_url":"https://api.github.com/users/zdajani/following{/other_user}","gists_url":"https://api.github.com/users/zdajani/gists{/gist_id}","starred_url":"https://api.github.com/users/zdajani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdajani/subscriptions","organizations_url":"https://api.github.com/users/zdajani/orgs","repos_url":"https://api.github.com/users/zdajani/repos","events_url":"https://api.github.com/users/zdajani/events{/privacy}","received_events_url":"https://api.github.com/users/zdajani/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-26T21:33:54Z","updated_at":"2015-07-31T10:53:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5bad958f1d76db052d07cebbd5d5dd27b4929ebd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/53/commits","review_comments_url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/53/comments","review_comment_url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/makersacademy/instagram-challenge/issues/53/comments","statuses_url":"https://api.github.com/repos/makersacademy/instagram-challenge/statuses/61c6ec7db1282b8adc903f0eda8ead8668500176","head":{"label":"zdajani:master","ref":"master","sha":"61c6ec7db1282b8adc903f0eda8ead8668500176","user":{"login":"zdajani","id":9772849,"avatar_url":"https://avatars.githubusercontent.com/u/9772849?v=3","gravatar_id":"","url":"https://api.github.com/users/zdajani","html_url":"https://github.com/zdajani","followers_url":"https://api.github.com/users/zdajani/followers","following_url":"https://api.github.com/users/zdajani/following{/other_user}","gists_url":"https://api.github.com/users/zdajani/gists{/gist_id}","starred_url":"https://api.github.com/users/zdajani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdajani/subscriptions","organizations_url":"https://api.github.com/users/zdajani/orgs","repos_url":"https://api.github.com/users/zdajani/repos","events_url":"https://api.github.com/users/zdajani/events{/privacy}","received_events_url":"https://api.github.com/users/zdajani/received_events","type":"User","site_admin":false},"repo":{"id":39636151,"name":"instagram-challenge","full_name":"zdajani/instagram-challenge","owner":{"login":"zdajani","id":9772849,"avatar_url":"https://avatars.githubusercontent.com/u/9772849?v=3","gravatar_id":"","url":"https://api.github.com/users/zdajani","html_url":"https://github.com/zdajani","followers_url":"https://api.github.com/users/zdajani/followers","following_url":"https://api.github.com/users/zdajani/following{/other_user}","gists_url":"https://api.github.com/users/zdajani/gists{/gist_id}","starred_url":"https://api.github.com/users/zdajani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdajani/subscriptions","organizations_url":"https://api.github.com/users/zdajani/orgs","repos_url":"https://api.github.com/users/zdajani/repos","events_url":"https://api.github.com/users/zdajani/events{/privacy}","received_events_url":"https://api.github.com/users/zdajani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zdajani/instagram-challenge","description":"Rebuild Instagram","fork":true,"url":"https://api.github.com/repos/zdajani/instagram-challenge","forks_url":"https://api.github.com/repos/zdajani/instagram-challenge/forks","keys_url":"https://api.github.com/repos/zdajani/instagram-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zdajani/instagram-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zdajani/instagram-challenge/teams","hooks_url":"https://api.github.com/repos/zdajani/instagram-challenge/hooks","issue_events_url":"https://api.github.com/repos/zdajani/instagram-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/zdajani/instagram-challenge/events","assignees_url":"https://api.github.com/repos/zdajani/instagram-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/zdajani/instagram-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/zdajani/instagram-challenge/tags","blobs_url":"https://api.github.com/repos/zdajani/instagram-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zdajani/instagram-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zdajani/instagram-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/zdajani/instagram-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zdajani/instagram-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/zdajani/instagram-challenge/languages","stargazers_url":"https://api.github.com/repos/zdajani/instagram-challenge/stargazers","contributors_url":"https://api.github.com/repos/zdajani/instagram-challenge/contributors","subscribers_url":"https://api.github.com/repos/zdajani/instagram-challenge/subscribers","subscription_url":"https://api.github.com/repos/zdajani/instagram-challenge/subscription","commits_url":"https://api.github.com/repos/zdajani/instagram-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/zdajani/instagram-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/zdajani/instagram-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/zdajani/instagram-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/zdajani/instagram-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/zdajani/instagram-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zdajani/instagram-challenge/merges","archive_url":"https://api.github.com/repos/zdajani/instagram-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zdajani/instagram-challenge/downloads","issues_url":"https://api.github.com/repos/zdajani/instagram-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/zdajani/instagram-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/zdajani/instagram-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/zdajani/instagram-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zdajani/instagram-challenge/labels{/name}","releases_url":"https://api.github.com/repos/zdajani/instagram-challenge/releases{/id}","created_at":"2015-07-24T13:44:27Z","updated_at":"2015-07-24T17:02:57Z","pushed_at":"2015-07-27T08:47:01Z","git_url":"git://github.com/zdajani/instagram-challenge.git","ssh_url":"git@github.com:zdajani/instagram-challenge.git","clone_url":"https://github.com/zdajani/instagram-challenge.git","svn_url":"https://github.com/zdajani/instagram-challenge","homepage":null,"size":672,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"makersacademy:master","ref":"master","sha":"eaa3ee818a47b43e7d56fc750dd8e672997d3636","user":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"repo":{"id":27006364,"name":"instagram-challenge","full_name":"makersacademy/instagram-challenge","owner":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/makersacademy/instagram-challenge","description":"Rebuild Instagram","fork":false,"url":"https://api.github.com/repos/makersacademy/instagram-challenge","forks_url":"https://api.github.com/repos/makersacademy/instagram-challenge/forks","keys_url":"https://api.github.com/repos/makersacademy/instagram-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/makersacademy/instagram-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/makersacademy/instagram-challenge/teams","hooks_url":"https://api.github.com/repos/makersacademy/instagram-challenge/hooks","issue_events_url":"https://api.github.com/repos/makersacademy/instagram-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/makersacademy/instagram-challenge/events","assignees_url":"https://api.github.com/repos/makersacademy/instagram-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/makersacademy/instagram-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/makersacademy/instagram-challenge/tags","blobs_url":"https://api.github.com/repos/makersacademy/instagram-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/makersacademy/instagram-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/makersacademy/instagram-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/makersacademy/instagram-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/makersacademy/instagram-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/makersacademy/instagram-challenge/languages","stargazers_url":"https://api.github.com/repos/makersacademy/instagram-challenge/stargazers","contributors_url":"https://api.github.com/repos/makersacademy/instagram-challenge/contributors","subscribers_url":"https://api.github.com/repos/makersacademy/instagram-challenge/subscribers","subscription_url":"https://api.github.com/repos/makersacademy/instagram-challenge/subscription","commits_url":"https://api.github.com/repos/makersacademy/instagram-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/makersacademy/instagram-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/makersacademy/instagram-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/makersacademy/instagram-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/makersacademy/instagram-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/makersacademy/instagram-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/makersacademy/instagram-challenge/merges","archive_url":"https://api.github.com/repos/makersacademy/instagram-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/makersacademy/instagram-challenge/downloads","issues_url":"https://api.github.com/repos/makersacademy/instagram-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/makersacademy/instagram-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/makersacademy/instagram-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/makersacademy/instagram-challenge/labels{/name}","releases_url":"https://api.github.com/repos/makersacademy/instagram-challenge/releases{/id}","created_at":"2014-11-22T17:26:37Z","updated_at":"2015-04-02T15:05:17Z","pushed_at":"2015-07-30T22:35:26Z","git_url":"git://github.com/makersacademy/instagram-challenge.git","ssh_url":"git@github.com:makersacademy/instagram-challenge.git","clone_url":"https://github.com/makersacademy/instagram-challenge.git","svn_url":"https://github.com/makersacademy/instagram-challenge","homepage":null,"size":79959,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":22,"forks":87,"open_issues":22,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/53"},"html":{"href":"https://github.com/makersacademy/instagram-challenge/pull/53"},"issue":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/issues/53"},"comments":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/statuses/61c6ec7db1282b8adc903f0eda8ead8668500176"}}}}