{"action":"created","comment":{"url":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/comments/58201164","id":58201164,"diff_hunk":"@@ -50,4 +67,33 @@\n       end\n     end\n   end\n+\n+  describe 'DELETE #destroy' do\n+    sign_in_user\n+    let!(:question) { create(:question, user: @user) }\n+    let!(:question_not_owned) { create(:question) }\n+\n+    context 'question is deleted by owner' do\n+      it 'deletes question' do\n+        expect { delete :destroy, id: question }\n+          .to change(Question, :count).by(-1)\n+      end\n+\n+      it 'renders #index page' do\n+        delete :destroy, id: question\n+        expect(response).to redirect_to root_path\n+      end\n+    end\n+    context 'question is deleted by not owner' do\n+      it 'deletes question' do\n+        expect { delete :destroy, id: question_not_owned }\n+          .to change(Question, :count).by(0)","path":"spec/controllers/questions_controller_spec.rb","position":74,"original_position":74,"commit_id":"333d16c0641390c539d0bf0347e643e3825ba9fe","original_commit_id":"333d16c0641390c539d0bf0347e643e3825ba9fe","user":{"login":"vkurennov","id":968537,"avatar_url":"https://avatars.githubusercontent.com/u/968537?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurennov","html_url":"https://github.com/vkurennov","followers_url":"https://api.github.com/users/vkurennov/followers","following_url":"https://api.github.com/users/vkurennov/following{/other_user}","gists_url":"https://api.github.com/users/vkurennov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurennov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurennov/subscriptions","organizations_url":"https://api.github.com/users/vkurennov/orgs","repos_url":"https://api.github.com/users/vkurennov/repos","events_url":"https://api.github.com/users/vkurennov/events{/privacy}","received_events_url":"https://api.github.com/users/vkurennov/received_events","type":"User","site_admin":false},"body":"`to_not change(...)`","created_at":"2016-04-01T12:56:20Z","updated_at":"2016-04-01T12:56:20Z","html_url":"https://github.com/Finboggi/question_answer_system/pull/3#discussion_r58201164","pull_request_url":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/comments/58201164"},"html":{"href":"https://github.com/Finboggi/question_answer_system/pull/3#discussion_r58201164"},"pull_request":{"href":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/3","id":64887222,"html_url":"https://github.com/Finboggi/question_answer_system/pull/3","diff_url":"https://github.com/Finboggi/question_answer_system/pull/3.diff","patch_url":"https://github.com/Finboggi/question_answer_system/pull/3.patch","issue_url":"https://api.github.com/repos/Finboggi/question_answer_system/issues/3","number":3,"state":"open","locked":false,"title":"General qna features","user":{"login":"Finboggi","id":11841053,"avatar_url":"https://avatars.githubusercontent.com/u/11841053?v=3","gravatar_id":"","url":"https://api.github.com/users/Finboggi","html_url":"https://github.com/Finboggi","followers_url":"https://api.github.com/users/Finboggi/followers","following_url":"https://api.github.com/users/Finboggi/following{/other_user}","gists_url":"https://api.github.com/users/Finboggi/gists{/gist_id}","starred_url":"https://api.github.com/users/Finboggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Finboggi/subscriptions","organizations_url":"https://api.github.com/users/Finboggi/orgs","repos_url":"https://api.github.com/users/Finboggi/repos","events_url":"https://api.github.com/users/Finboggi/events{/privacy}","received_events_url":"https://api.github.com/users/Finboggi/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-01T02:20:42Z","updated_at":"2016-04-01T12:56:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfa5313484c0e773b70ab0ec4bcb49f07242f097","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Finboggi/question_answer_system/issues/3/comments","statuses_url":"https://api.github.com/repos/Finboggi/question_answer_system/statuses/333d16c0641390c539d0bf0347e643e3825ba9fe","head":{"label":"Finboggi:general_qna_features","ref":"general_qna_features","sha":"333d16c0641390c539d0bf0347e643e3825ba9fe","user":{"login":"Finboggi","id":11841053,"avatar_url":"https://avatars.githubusercontent.com/u/11841053?v=3","gravatar_id":"","url":"https://api.github.com/users/Finboggi","html_url":"https://github.com/Finboggi","followers_url":"https://api.github.com/users/Finboggi/followers","following_url":"https://api.github.com/users/Finboggi/following{/other_user}","gists_url":"https://api.github.com/users/Finboggi/gists{/gist_id}","starred_url":"https://api.github.com/users/Finboggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Finboggi/subscriptions","organizations_url":"https://api.github.com/users/Finboggi/orgs","repos_url":"https://api.github.com/users/Finboggi/repos","events_url":"https://api.github.com/users/Finboggi/events{/privacy}","received_events_url":"https://api.github.com/users/Finboggi/received_events","type":"User","site_admin":false},"repo":{"id":54062713,"name":"question_answer_system","full_name":"Finboggi/question_answer_system","owner":{"login":"Finboggi","id":11841053,"avatar_url":"https://avatars.githubusercontent.com/u/11841053?v=3","gravatar_id":"","url":"https://api.github.com/users/Finboggi","html_url":"https://github.com/Finboggi","followers_url":"https://api.github.com/users/Finboggi/followers","following_url":"https://api.github.com/users/Finboggi/following{/other_user}","gists_url":"https://api.github.com/users/Finboggi/gists{/gist_id}","starred_url":"https://api.github.com/users/Finboggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Finboggi/subscriptions","organizations_url":"https://api.github.com/users/Finboggi/orgs","repos_url":"https://api.github.com/users/Finboggi/repos","events_url":"https://api.github.com/users/Finboggi/events{/privacy}","received_events_url":"https://api.github.com/users/Finboggi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Finboggi/question_answer_system","description":"Система ворпросов и ответов для курса интенсивного обучения RoR в thinknetika.com (клон stackoverflow)","fork":false,"url":"https://api.github.com/repos/Finboggi/question_answer_system","forks_url":"https://api.github.com/repos/Finboggi/question_answer_system/forks","keys_url":"https://api.github.com/repos/Finboggi/question_answer_system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Finboggi/question_answer_system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Finboggi/question_answer_system/teams","hooks_url":"https://api.github.com/repos/Finboggi/question_answer_system/hooks","issue_events_url":"https://api.github.com/repos/Finboggi/question_answer_system/issues/events{/number}","events_url":"https://api.github.com/repos/Finboggi/question_answer_system/events","assignees_url":"https://api.github.com/repos/Finboggi/question_answer_system/assignees{/user}","branches_url":"https://api.github.com/repos/Finboggi/question_answer_system/branches{/branch}","tags_url":"https://api.github.com/repos/Finboggi/question_answer_system/tags","blobs_url":"https://api.github.com/repos/Finboggi/question_answer_system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Finboggi/question_answer_system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Finboggi/question_answer_system/git/refs{/sha}","trees_url":"https://api.github.com/repos/Finboggi/question_answer_system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Finboggi/question_answer_system/statuses/{sha}","languages_url":"https://api.github.com/repos/Finboggi/question_answer_system/languages","stargazers_url":"https://api.github.com/repos/Finboggi/question_answer_system/stargazers","contributors_url":"https://api.github.com/repos/Finboggi/question_answer_system/contributors","subscribers_url":"https://api.github.com/repos/Finboggi/question_answer_system/subscribers","subscription_url":"https://api.github.com/repos/Finboggi/question_answer_system/subscription","commits_url":"https://api.github.com/repos/Finboggi/question_answer_system/commits{/sha}","git_commits_url":"https://api.github.com/repos/Finboggi/question_answer_system/git/commits{/sha}","comments_url":"https://api.github.com/repos/Finboggi/question_answer_system/comments{/number}","issue_comment_url":"https://api.github.com/repos/Finboggi/question_answer_system/issues/comments{/number}","contents_url":"https://api.github.com/repos/Finboggi/question_answer_system/contents/{+path}","compare_url":"https://api.github.com/repos/Finboggi/question_answer_system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Finboggi/question_answer_system/merges","archive_url":"https://api.github.com/repos/Finboggi/question_answer_system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Finboggi/question_answer_system/downloads","issues_url":"https://api.github.com/repos/Finboggi/question_answer_system/issues{/number}","pulls_url":"https://api.github.com/repos/Finboggi/question_answer_system/pulls{/number}","milestones_url":"https://api.github.com/repos/Finboggi/question_answer_system/milestones{/number}","notifications_url":"https://api.github.com/repos/Finboggi/question_answer_system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Finboggi/question_answer_system/labels{/name}","releases_url":"https://api.github.com/repos/Finboggi/question_answer_system/releases{/id}","deployments_url":"https://api.github.com/repos/Finboggi/question_answer_system/deployments","created_at":"2016-03-16T20:04:15Z","updated_at":"2016-03-17T21:51:28Z","pushed_at":"2016-04-01T02:50:54Z","git_url":"git://github.com/Finboggi/question_answer_system.git","ssh_url":"git@github.com:Finboggi/question_answer_system.git","clone_url":"https://github.com/Finboggi/question_answer_system.git","svn_url":"https://github.com/Finboggi/question_answer_system","homepage":"","size":86,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Finboggi:master","ref":"master","sha":"24a46f090cf4aceaf9b497b58efb65c06887aada","user":{"login":"Finboggi","id":11841053,"avatar_url":"https://avatars.githubusercontent.com/u/11841053?v=3","gravatar_id":"","url":"https://api.github.com/users/Finboggi","html_url":"https://github.com/Finboggi","followers_url":"https://api.github.com/users/Finboggi/followers","following_url":"https://api.github.com/users/Finboggi/following{/other_user}","gists_url":"https://api.github.com/users/Finboggi/gists{/gist_id}","starred_url":"https://api.github.com/users/Finboggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Finboggi/subscriptions","organizations_url":"https://api.github.com/users/Finboggi/orgs","repos_url":"https://api.github.com/users/Finboggi/repos","events_url":"https://api.github.com/users/Finboggi/events{/privacy}","received_events_url":"https://api.github.com/users/Finboggi/received_events","type":"User","site_admin":false},"repo":{"id":54062713,"name":"question_answer_system","full_name":"Finboggi/question_answer_system","owner":{"login":"Finboggi","id":11841053,"avatar_url":"https://avatars.githubusercontent.com/u/11841053?v=3","gravatar_id":"","url":"https://api.github.com/users/Finboggi","html_url":"https://github.com/Finboggi","followers_url":"https://api.github.com/users/Finboggi/followers","following_url":"https://api.github.com/users/Finboggi/following{/other_user}","gists_url":"https://api.github.com/users/Finboggi/gists{/gist_id}","starred_url":"https://api.github.com/users/Finboggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Finboggi/subscriptions","organizations_url":"https://api.github.com/users/Finboggi/orgs","repos_url":"https://api.github.com/users/Finboggi/repos","events_url":"https://api.github.com/users/Finboggi/events{/privacy}","received_events_url":"https://api.github.com/users/Finboggi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Finboggi/question_answer_system","description":"Система ворпросов и ответов для курса интенсивного обучения RoR в thinknetika.com (клон stackoverflow)","fork":false,"url":"https://api.github.com/repos/Finboggi/question_answer_system","forks_url":"https://api.github.com/repos/Finboggi/question_answer_system/forks","keys_url":"https://api.github.com/repos/Finboggi/question_answer_system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Finboggi/question_answer_system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Finboggi/question_answer_system/teams","hooks_url":"https://api.github.com/repos/Finboggi/question_answer_system/hooks","issue_events_url":"https://api.github.com/repos/Finboggi/question_answer_system/issues/events{/number}","events_url":"https://api.github.com/repos/Finboggi/question_answer_system/events","assignees_url":"https://api.github.com/repos/Finboggi/question_answer_system/assignees{/user}","branches_url":"https://api.github.com/repos/Finboggi/question_answer_system/branches{/branch}","tags_url":"https://api.github.com/repos/Finboggi/question_answer_system/tags","blobs_url":"https://api.github.com/repos/Finboggi/question_answer_system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Finboggi/question_answer_system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Finboggi/question_answer_system/git/refs{/sha}","trees_url":"https://api.github.com/repos/Finboggi/question_answer_system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Finboggi/question_answer_system/statuses/{sha}","languages_url":"https://api.github.com/repos/Finboggi/question_answer_system/languages","stargazers_url":"https://api.github.com/repos/Finboggi/question_answer_system/stargazers","contributors_url":"https://api.github.com/repos/Finboggi/question_answer_system/contributors","subscribers_url":"https://api.github.com/repos/Finboggi/question_answer_system/subscribers","subscription_url":"https://api.github.com/repos/Finboggi/question_answer_system/subscription","commits_url":"https://api.github.com/repos/Finboggi/question_answer_system/commits{/sha}","git_commits_url":"https://api.github.com/repos/Finboggi/question_answer_system/git/commits{/sha}","comments_url":"https://api.github.com/repos/Finboggi/question_answer_system/comments{/number}","issue_comment_url":"https://api.github.com/repos/Finboggi/question_answer_system/issues/comments{/number}","contents_url":"https://api.github.com/repos/Finboggi/question_answer_system/contents/{+path}","compare_url":"https://api.github.com/repos/Finboggi/question_answer_system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Finboggi/question_answer_system/merges","archive_url":"https://api.github.com/repos/Finboggi/question_answer_system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Finboggi/question_answer_system/downloads","issues_url":"https://api.github.com/repos/Finboggi/question_answer_system/issues{/number}","pulls_url":"https://api.github.com/repos/Finboggi/question_answer_system/pulls{/number}","milestones_url":"https://api.github.com/repos/Finboggi/question_answer_system/milestones{/number}","notifications_url":"https://api.github.com/repos/Finboggi/question_answer_system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Finboggi/question_answer_system/labels{/name}","releases_url":"https://api.github.com/repos/Finboggi/question_answer_system/releases{/id}","deployments_url":"https://api.github.com/repos/Finboggi/question_answer_system/deployments","created_at":"2016-03-16T20:04:15Z","updated_at":"2016-03-17T21:51:28Z","pushed_at":"2016-04-01T02:50:54Z","git_url":"git://github.com/Finboggi/question_answer_system.git","ssh_url":"git@github.com:Finboggi/question_answer_system.git","clone_url":"https://github.com/Finboggi/question_answer_system.git","svn_url":"https://github.com/Finboggi/question_answer_system","homepage":"","size":86,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/3"},"html":{"href":"https://github.com/Finboggi/question_answer_system/pull/3"},"issue":{"href":"https://api.github.com/repos/Finboggi/question_answer_system/issues/3"},"comments":{"href":"https://api.github.com/repos/Finboggi/question_answer_system/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Finboggi/question_answer_system/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Finboggi/question_answer_system/statuses/333d16c0641390c539d0bf0347e643e3825ba9fe"}}}}