{"action":"created","comment":{"url":"https://api.github.com/repos/zursmansors/askme/pulls/comments/46684572","id":46684572,"diff_hunk":"@@ -0,0 +1,26 @@\n+require 'rails_helper'\n+\n+feature 'Delete question', %q{\n+  In order to delete question\n+  As authenticated user\n+  I want to delete question\n+} do\n+\n+  given(:user) { create :user }\n+  given(:question) { create(:question, user: user) }\n+\n+  scenario 'Authenticated user tries to delete his own question' do\n+    sign_in user\n+    visit question_path","path":"spec/acceptance/question/delete_question_spec.rb","position":14,"original_position":14,"commit_id":"97a44fc8e01812450b3f6afeb44d90c30fd4ce8a","original_commit_id":"97a44fc8e01812450b3f6afeb44d90c30fd4ce8a","user":{"login":"palkan","id":1516722,"avatar_url":"https://avatars.githubusercontent.com/u/1516722?v=3","gravatar_id":"","url":"https://api.github.com/users/palkan","html_url":"https://github.com/palkan","followers_url":"https://api.github.com/users/palkan/followers","following_url":"https://api.github.com/users/palkan/following{/other_user}","gists_url":"https://api.github.com/users/palkan/gists{/gist_id}","starred_url":"https://api.github.com/users/palkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palkan/subscriptions","organizations_url":"https://api.github.com/users/palkan/orgs","repos_url":"https://api.github.com/users/palkan/repos","events_url":"https://api.github.com/users/palkan/events{/privacy}","received_events_url":"https://api.github.com/users/palkan/received_events","type":"User","site_admin":false},"body":"Нужно указать вопрос в хэлпере – `question_path(question)`.","created_at":"2015-12-04T14:07:09Z","updated_at":"2015-12-04T14:07:09Z","html_url":"https://github.com/zursmansors/askme/pull/5#discussion_r46684572","pull_request_url":"https://api.github.com/repos/zursmansors/askme/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/zursmansors/askme/pulls/comments/46684572"},"html":{"href":"https://github.com/zursmansors/askme/pull/5#discussion_r46684572"},"pull_request":{"href":"https://api.github.com/repos/zursmansors/askme/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/zursmansors/askme/pulls/5","id":52671588,"html_url":"https://github.com/zursmansors/askme/pull/5","diff_url":"https://github.com/zursmansors/askme/pull/5.diff","patch_url":"https://github.com/zursmansors/askme/pull/5.patch","issue_url":"https://api.github.com/repos/zursmansors/askme/issues/5","number":5,"state":"open","locked":false,"title":"Lesson 5","user":{"login":"zursmansors","id":10698996,"avatar_url":"https://avatars.githubusercontent.com/u/10698996?v=3","gravatar_id":"","url":"https://api.github.com/users/zursmansors","html_url":"https://github.com/zursmansors","followers_url":"https://api.github.com/users/zursmansors/followers","following_url":"https://api.github.com/users/zursmansors/following{/other_user}","gists_url":"https://api.github.com/users/zursmansors/gists{/gist_id}","starred_url":"https://api.github.com/users/zursmansors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zursmansors/subscriptions","organizations_url":"https://api.github.com/users/zursmansors/orgs","repos_url":"https://api.github.com/users/zursmansors/repos","events_url":"https://api.github.com/users/zursmansors/events{/privacy}","received_events_url":"https://api.github.com/users/zursmansors/received_events","type":"User","site_admin":false},"body":"Владимир, подскажи, пожалуйста, что я делаю не так. Бьюсь уже два дня, не проходят два теста:\r\n1.\r\nrspec spec/acceptance/question/delete_question_spec.rb\r\nFailures:\r\n  1) Delete question\r\n  In order to delete question\r\n  As authenticated user\r\n  I want to delete question\r\n Authenticated user tries to delete his own question\r\n     Failure/Error: visit question_path\r\n\r\n     ActionController::UrlGenerationError:\r\n       No route matches {:action=>\"show\", :controller=>\"questions\"} missing required keys: [:id]\r\n     # ./spec/acceptance/question/delete_question_spec.rb:15:in `block (2 levels) in <top (required)>'\r\n\r\nСоответственно, контроллер не удаляет вопрос из базы. Хотя в самой форме удаление происходит.\r\n\r\nQuestionsController DELETE #destroy question owner delete the question\r\n     Failure/Error: expect { delete :destroy, id: question }.to change(user.questions, :count).by(-1)\r\n       expected #count to have changed by -1, but was changed by 0\r\n\r\n2.\r\nrspec spec/acceptance/answer/delete_answer_spec.rb\r\n\r\n    Failure/Error: .center = button_to \"Delete answer\", answer, method: :delete\r\n\r\n     ActionView::Template::Error:\r\n       undefined method `answer_path'","created_at":"2015-12-04T13:55:31Z","updated_at":"2015-12-04T14:07:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7d0e6f7ccabd518a02cee52a9a829a43970fab9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zursmansors/askme/pulls/5/commits","review_comments_url":"https://api.github.com/repos/zursmansors/askme/pulls/5/comments","review_comment_url":"https://api.github.com/repos/zursmansors/askme/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zursmansors/askme/issues/5/comments","statuses_url":"https://api.github.com/repos/zursmansors/askme/statuses/97a44fc8e01812450b3f6afeb44d90c30fd4ce8a","head":{"label":"zursmansors:lesson_5","ref":"lesson_5","sha":"97a44fc8e01812450b3f6afeb44d90c30fd4ce8a","user":{"login":"zursmansors","id":10698996,"avatar_url":"https://avatars.githubusercontent.com/u/10698996?v=3","gravatar_id":"","url":"https://api.github.com/users/zursmansors","html_url":"https://github.com/zursmansors","followers_url":"https://api.github.com/users/zursmansors/followers","following_url":"https://api.github.com/users/zursmansors/following{/other_user}","gists_url":"https://api.github.com/users/zursmansors/gists{/gist_id}","starred_url":"https://api.github.com/users/zursmansors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zursmansors/subscriptions","organizations_url":"https://api.github.com/users/zursmansors/orgs","repos_url":"https://api.github.com/users/zursmansors/repos","events_url":"https://api.github.com/users/zursmansors/events{/privacy}","received_events_url":"https://api.github.com/users/zursmansors/received_events","type":"User","site_admin":false},"repo":{"id":46078499,"name":"askme","full_name":"zursmansors/askme","owner":{"login":"zursmansors","id":10698996,"avatar_url":"https://avatars.githubusercontent.com/u/10698996?v=3","gravatar_id":"","url":"https://api.github.com/users/zursmansors","html_url":"https://github.com/zursmansors","followers_url":"https://api.github.com/users/zursmansors/followers","following_url":"https://api.github.com/users/zursmansors/following{/other_user}","gists_url":"https://api.github.com/users/zursmansors/gists{/gist_id}","starred_url":"https://api.github.com/users/zursmansors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zursmansors/subscriptions","organizations_url":"https://api.github.com/users/zursmansors/orgs","repos_url":"https://api.github.com/users/zursmansors/repos","events_url":"https://api.github.com/users/zursmansors/events{/privacy}","received_events_url":"https://api.github.com/users/zursmansors/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zursmansors/askme","description":"","fork":false,"url":"https://api.github.com/repos/zursmansors/askme","forks_url":"https://api.github.com/repos/zursmansors/askme/forks","keys_url":"https://api.github.com/repos/zursmansors/askme/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zursmansors/askme/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zursmansors/askme/teams","hooks_url":"https://api.github.com/repos/zursmansors/askme/hooks","issue_events_url":"https://api.github.com/repos/zursmansors/askme/issues/events{/number}","events_url":"https://api.github.com/repos/zursmansors/askme/events","assignees_url":"https://api.github.com/repos/zursmansors/askme/assignees{/user}","branches_url":"https://api.github.com/repos/zursmansors/askme/branches{/branch}","tags_url":"https://api.github.com/repos/zursmansors/askme/tags","blobs_url":"https://api.github.com/repos/zursmansors/askme/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zursmansors/askme/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zursmansors/askme/git/refs{/sha}","trees_url":"https://api.github.com/repos/zursmansors/askme/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zursmansors/askme/statuses/{sha}","languages_url":"https://api.github.com/repos/zursmansors/askme/languages","stargazers_url":"https://api.github.com/repos/zursmansors/askme/stargazers","contributors_url":"https://api.github.com/repos/zursmansors/askme/contributors","subscribers_url":"https://api.github.com/repos/zursmansors/askme/subscribers","subscription_url":"https://api.github.com/repos/zursmansors/askme/subscription","commits_url":"https://api.github.com/repos/zursmansors/askme/commits{/sha}","git_commits_url":"https://api.github.com/repos/zursmansors/askme/git/commits{/sha}","comments_url":"https://api.github.com/repos/zursmansors/askme/comments{/number}","issue_comment_url":"https://api.github.com/repos/zursmansors/askme/issues/comments{/number}","contents_url":"https://api.github.com/repos/zursmansors/askme/contents/{+path}","compare_url":"https://api.github.com/repos/zursmansors/askme/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zursmansors/askme/merges","archive_url":"https://api.github.com/repos/zursmansors/askme/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zursmansors/askme/downloads","issues_url":"https://api.github.com/repos/zursmansors/askme/issues{/number}","pulls_url":"https://api.github.com/repos/zursmansors/askme/pulls{/number}","milestones_url":"https://api.github.com/repos/zursmansors/askme/milestones{/number}","notifications_url":"https://api.github.com/repos/zursmansors/askme/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zursmansors/askme/labels{/name}","releases_url":"https://api.github.com/repos/zursmansors/askme/releases{/id}","created_at":"2015-11-12T20:20:43Z","updated_at":"2015-11-17T22:24:33Z","pushed_at":"2015-12-04T13:55:32Z","git_url":"git://github.com/zursmansors/askme.git","ssh_url":"git@github.com:zursmansors/askme.git","clone_url":"https://github.com/zursmansors/askme.git","svn_url":"https://github.com/zursmansors/askme","homepage":"","size":63,"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":"zursmansors:master","ref":"master","sha":"fe0b36e43aeab3e771afb4c7c58857e1911bd0be","user":{"login":"zursmansors","id":10698996,"avatar_url":"https://avatars.githubusercontent.com/u/10698996?v=3","gravatar_id":"","url":"https://api.github.com/users/zursmansors","html_url":"https://github.com/zursmansors","followers_url":"https://api.github.com/users/zursmansors/followers","following_url":"https://api.github.com/users/zursmansors/following{/other_user}","gists_url":"https://api.github.com/users/zursmansors/gists{/gist_id}","starred_url":"https://api.github.com/users/zursmansors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zursmansors/subscriptions","organizations_url":"https://api.github.com/users/zursmansors/orgs","repos_url":"https://api.github.com/users/zursmansors/repos","events_url":"https://api.github.com/users/zursmansors/events{/privacy}","received_events_url":"https://api.github.com/users/zursmansors/received_events","type":"User","site_admin":false},"repo":{"id":46078499,"name":"askme","full_name":"zursmansors/askme","owner":{"login":"zursmansors","id":10698996,"avatar_url":"https://avatars.githubusercontent.com/u/10698996?v=3","gravatar_id":"","url":"https://api.github.com/users/zursmansors","html_url":"https://github.com/zursmansors","followers_url":"https://api.github.com/users/zursmansors/followers","following_url":"https://api.github.com/users/zursmansors/following{/other_user}","gists_url":"https://api.github.com/users/zursmansors/gists{/gist_id}","starred_url":"https://api.github.com/users/zursmansors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zursmansors/subscriptions","organizations_url":"https://api.github.com/users/zursmansors/orgs","repos_url":"https://api.github.com/users/zursmansors/repos","events_url":"https://api.github.com/users/zursmansors/events{/privacy}","received_events_url":"https://api.github.com/users/zursmansors/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zursmansors/askme","description":"","fork":false,"url":"https://api.github.com/repos/zursmansors/askme","forks_url":"https://api.github.com/repos/zursmansors/askme/forks","keys_url":"https://api.github.com/repos/zursmansors/askme/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zursmansors/askme/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zursmansors/askme/teams","hooks_url":"https://api.github.com/repos/zursmansors/askme/hooks","issue_events_url":"https://api.github.com/repos/zursmansors/askme/issues/events{/number}","events_url":"https://api.github.com/repos/zursmansors/askme/events","assignees_url":"https://api.github.com/repos/zursmansors/askme/assignees{/user}","branches_url":"https://api.github.com/repos/zursmansors/askme/branches{/branch}","tags_url":"https://api.github.com/repos/zursmansors/askme/tags","blobs_url":"https://api.github.com/repos/zursmansors/askme/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zursmansors/askme/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zursmansors/askme/git/refs{/sha}","trees_url":"https://api.github.com/repos/zursmansors/askme/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zursmansors/askme/statuses/{sha}","languages_url":"https://api.github.com/repos/zursmansors/askme/languages","stargazers_url":"https://api.github.com/repos/zursmansors/askme/stargazers","contributors_url":"https://api.github.com/repos/zursmansors/askme/contributors","subscribers_url":"https://api.github.com/repos/zursmansors/askme/subscribers","subscription_url":"https://api.github.com/repos/zursmansors/askme/subscription","commits_url":"https://api.github.com/repos/zursmansors/askme/commits{/sha}","git_commits_url":"https://api.github.com/repos/zursmansors/askme/git/commits{/sha}","comments_url":"https://api.github.com/repos/zursmansors/askme/comments{/number}","issue_comment_url":"https://api.github.com/repos/zursmansors/askme/issues/comments{/number}","contents_url":"https://api.github.com/repos/zursmansors/askme/contents/{+path}","compare_url":"https://api.github.com/repos/zursmansors/askme/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zursmansors/askme/merges","archive_url":"https://api.github.com/repos/zursmansors/askme/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zursmansors/askme/downloads","issues_url":"https://api.github.com/repos/zursmansors/askme/issues{/number}","pulls_url":"https://api.github.com/repos/zursmansors/askme/pulls{/number}","milestones_url":"https://api.github.com/repos/zursmansors/askme/milestones{/number}","notifications_url":"https://api.github.com/repos/zursmansors/askme/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zursmansors/askme/labels{/name}","releases_url":"https://api.github.com/repos/zursmansors/askme/releases{/id}","created_at":"2015-11-12T20:20:43Z","updated_at":"2015-11-17T22:24:33Z","pushed_at":"2015-12-04T13:55:32Z","git_url":"git://github.com/zursmansors/askme.git","ssh_url":"git@github.com:zursmansors/askme.git","clone_url":"https://github.com/zursmansors/askme.git","svn_url":"https://github.com/zursmansors/askme","homepage":"","size":63,"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/zursmansors/askme/pulls/5"},"html":{"href":"https://github.com/zursmansors/askme/pull/5"},"issue":{"href":"https://api.github.com/repos/zursmansors/askme/issues/5"},"comments":{"href":"https://api.github.com/repos/zursmansors/askme/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/zursmansors/askme/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/zursmansors/askme/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zursmansors/askme/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/zursmansors/askme/statuses/97a44fc8e01812450b3f6afeb44d90c30fd4ce8a"}}}}