{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/comments/38819703","id":38819703,"diff_hunk":"@@ -0,0 +1,136 @@\n+require 'rails_helper'\n+\n+feature 'photos' do\n+\n+  context 'no photo have been added' do\n+    scenario 'should display a prompt to add a photo' do\n+      visit '/photos'\n+      expect(page).to have_link 'Add a photo'\n+    end\n+  end\n+\n+  context 'adding photo' do\n+\n+    scenario 'should display a photo and his title' do\n+      visit '/photos'\n+      sign_up\n+      click_link 'Add a photo'\n+      attach_file 'Image', 'spec/features/sea.jpg'\n+      fill_in 'Title', with: 'Awesome sea'\n+      click_button 'Add photo'\n+      expect(page).to have_content 'Awesome sea'\n+      expect(page).to have_css('img[src*=\"sea.jpg\"]')\n+    end\n+\n+    scenario 'does not let you submit a photo without a title' do\n+      visit '/photos'\n+      sign_up\n+      click_link 'Add a photo'\n+      attach_file 'Image', 'spec/features/sea.jpg'\n+      fill_in 'Title', with: ''\n+      click_button 'Add photo'\n+      expect(page).to have_content 'error'\n+    end\n+\n+    scenario 'does not let you submit a photo without upload a image' do\n+      visit '/photos'\n+      sign_up\n+      click_link 'Add a photo'\n+      fill_in 'Title', with: 'hello world'\n+      click_button 'Add photo'\n+      expect(page).to have_content 'error'\n+    end\n+\n+\n+  end\n+\n+  context 'viewing photos' do\n+\n+    let!(:sea) {Photo.create(title:'Awesome sea',\n+                             image: File.new(\"spec/features/sea.jpg\") )}\n+\n+    scenario 'Lets a user view profile page of a photo' do\n+      visit '/photos'\n+      click_link 'Show photo'\n+      expect(page).to have_content 'Awesome sea'\n+      expect(current_path).to eq \"/photos/#{sea.id}\"\n+    end\n+\n+  end\n+\n+  context 'editing title or photo' do\n+\n+    scenario 'let a user edit the title' do\n+      sign_up\n+      click_link 'Add a photo'\n+      attach_file 'Image', 'spec/features/sea.jpg'\n+      fill_in 'Title', with: 'Awesome sea'\n+      click_button 'Add photo'\n+      click_link 'Edit'\n+      fill_in 'Title', with: 'Really awesome sea'\n+      click_button 'Edit'\n+      expect(page).to have_content 'Really awesome sea'\n+      expect(current_path).to eq '/photos'\n+    end\n+\n+    #  scenario \"don't let a user edit the photo if he is not the one that added it\" do\n+    #   sign_up\n+    #   click_link 'Add a photo'\n+    #   attach_file 'Image', 'spec/features/sea.jpg'\n+    #   fill_in 'Title', with: 'Awesome sea'\n+    #   click_button 'Add photo'\n+    #   click_link 'Sign out'\n+    #   sign_up_2\n+    #   click_button 'Edit'\n+    #   expect(page).to have_content 'You cannot edit this photo'\n+    #   expect(current_path).to eq '/photos'\n+    # end\n+\n+end\n+\n+  context 'deleting photo after log in' do\n+\n+    let!(:sea) {Photo.create(title:'Awesome sea',","path":"spec/features/photos_feature_spec.rb","position":93,"original_position":93,"commit_id":"cb03ef838bcf86228ae0914c4396a0c59f788985","original_commit_id":"cb03ef838bcf86228ae0914c4396a0c59f788985","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":"Avoid using {...} for multi-line blocks.<br>Block body expression is on the same line as the block start.<br>Space missing after colon.","created_at":"2015-09-06T09:46:49Z","updated_at":"2015-09-06T09:46:49Z","html_url":"https://github.com/makersacademy/instagram-challenge/pull/50#discussion_r38819703","pull_request_url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/comments/38819703"},"html":{"href":"https://github.com/makersacademy/instagram-challenge/pull/50#discussion_r38819703"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/50","id":40858592,"html_url":"https://github.com/makersacademy/instagram-challenge/pull/50","diff_url":"https://github.com/makersacademy/instagram-challenge/pull/50.diff","patch_url":"https://github.com/makersacademy/instagram-challenge/pull/50.patch","issue_url":"https://api.github.com/repos/makersacademy/instagram-challenge/issues/50","number":50,"state":"open","locked":false,"title":"Instagram challenge completed","user":{"login":"MassimilianoMura","id":11021928,"avatar_url":"https://avatars.githubusercontent.com/u/11021928?v=3","gravatar_id":"","url":"https://api.github.com/users/MassimilianoMura","html_url":"https://github.com/MassimilianoMura","followers_url":"https://api.github.com/users/MassimilianoMura/followers","following_url":"https://api.github.com/users/MassimilianoMura/following{/other_user}","gists_url":"https://api.github.com/users/MassimilianoMura/gists{/gist_id}","starred_url":"https://api.github.com/users/MassimilianoMura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MassimilianoMura/subscriptions","organizations_url":"https://api.github.com/users/MassimilianoMura/orgs","repos_url":"https://api.github.com/users/MassimilianoMura/repos","events_url":"https://api.github.com/users/MassimilianoMura/events{/privacy}","received_events_url":"https://api.github.com/users/MassimilianoMura/received_events","type":"User","site_admin":false},"body":"all challenge task completed\r\n\r\nMVP \r\ndevise log in\r\nfacebook log in\r\nonly user can delete or update their photo\r\nusers can leave comments\r\nlike button with ajax real time update working fine\r\n\r\nI need to refactoring test with helpers\r\nI need to update comment features\r\nI need to style with css, I focused only on back end side\r\nfound a small bug in Ajax call\r\n\r\n","created_at":"2015-07-26T19:47:33Z","updated_at":"2015-09-06T09:46:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d662df3a7bbdbf4474fbb12f7d5202b254ace3c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/50/commits","review_comments_url":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/50/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/50/comments","statuses_url":"https://api.github.com/repos/makersacademy/instagram-challenge/statuses/cb03ef838bcf86228ae0914c4396a0c59f788985","head":{"label":"MassimilianoMura:master","ref":"master","sha":"cb03ef838bcf86228ae0914c4396a0c59f788985","user":{"login":"MassimilianoMura","id":11021928,"avatar_url":"https://avatars.githubusercontent.com/u/11021928?v=3","gravatar_id":"","url":"https://api.github.com/users/MassimilianoMura","html_url":"https://github.com/MassimilianoMura","followers_url":"https://api.github.com/users/MassimilianoMura/followers","following_url":"https://api.github.com/users/MassimilianoMura/following{/other_user}","gists_url":"https://api.github.com/users/MassimilianoMura/gists{/gist_id}","starred_url":"https://api.github.com/users/MassimilianoMura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MassimilianoMura/subscriptions","organizations_url":"https://api.github.com/users/MassimilianoMura/orgs","repos_url":"https://api.github.com/users/MassimilianoMura/repos","events_url":"https://api.github.com/users/MassimilianoMura/events{/privacy}","received_events_url":"https://api.github.com/users/MassimilianoMura/received_events","type":"User","site_admin":false},"repo":{"id":39623327,"name":"MassiGram","full_name":"MassimilianoMura/MassiGram","owner":{"login":"MassimilianoMura","id":11021928,"avatar_url":"https://avatars.githubusercontent.com/u/11021928?v=3","gravatar_id":"","url":"https://api.github.com/users/MassimilianoMura","html_url":"https://github.com/MassimilianoMura","followers_url":"https://api.github.com/users/MassimilianoMura/followers","following_url":"https://api.github.com/users/MassimilianoMura/following{/other_user}","gists_url":"https://api.github.com/users/MassimilianoMura/gists{/gist_id}","starred_url":"https://api.github.com/users/MassimilianoMura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MassimilianoMura/subscriptions","organizations_url":"https://api.github.com/users/MassimilianoMura/orgs","repos_url":"https://api.github.com/users/MassimilianoMura/repos","events_url":"https://api.github.com/users/MassimilianoMura/events{/privacy}","received_events_url":"https://api.github.com/users/MassimilianoMura/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MassimilianoMura/MassiGram","description":"A basic Instagram clone, using Rails","fork":true,"url":"https://api.github.com/repos/MassimilianoMura/MassiGram","forks_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/forks","keys_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/teams","hooks_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/hooks","issue_events_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/issues/events{/number}","events_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/events","assignees_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/assignees{/user}","branches_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/branches{/branch}","tags_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/tags","blobs_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/git/refs{/sha}","trees_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/statuses/{sha}","languages_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/languages","stargazers_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/stargazers","contributors_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/contributors","subscribers_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/subscribers","subscription_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/subscription","commits_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/commits{/sha}","git_commits_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/git/commits{/sha}","comments_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/comments{/number}","issue_comment_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/issues/comments{/number}","contents_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/contents/{+path}","compare_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/merges","archive_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/downloads","issues_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/issues{/number}","pulls_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/pulls{/number}","milestones_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/milestones{/number}","notifications_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/labels{/name}","releases_url":"https://api.github.com/repos/MassimilianoMura/MassiGram/releases{/id}","created_at":"2015-07-24T09:25:30Z","updated_at":"2015-09-03T20:14:51Z","pushed_at":"2015-09-06T09:46:35Z","git_url":"git://github.com/MassimilianoMura/MassiGram.git","ssh_url":"git@github.com:MassimilianoMura/MassiGram.git","clone_url":"https://github.com/MassimilianoMura/MassiGram.git","svn_url":"https://github.com/MassimilianoMura/MassiGram","homepage":"","size":3125,"stargazers_count":1,"watchers_count":1,"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":1,"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-09-06T09:46:36Z","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":104244,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":110,"mirror_url":null,"open_issues_count":21,"forks":110,"open_issues":21,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/50"},"html":{"href":"https://github.com/makersacademy/instagram-challenge/pull/50"},"issue":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/issues/50"},"comments":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/pulls/50/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/50/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/instagram-challenge/statuses/cb03ef838bcf86228ae0914c4396a0c59f788985"}}}}