{"action":"created","comment":{"url":"https://api.github.com/repos/dimarikpro/qna2/pulls/comments/32406398","id":32406398,"diff_hunk":"@@ -44,9 +49,11 @@\n   end\n \n   describe 'POST #create' do\n+    sign_in_user\n     context 'with valid attributes' do\n-      it 'saves the new question in the database' do\n-        expect{ post :create, question: attributes_for(:question) }.to change(Question, :count).by(1)\n+      it 'question assigns to user' do\n+        post :create, question: attributes_for(:question)\n+        expect(assigns(:question).user_id).to eq subject.current_user.id","path":"spec/controllers/questions_controller_spec.rb","position":38,"original_position":38,"commit_id":"36dea0ff5dc4d29725f7600d33ded77ed33dc489","original_commit_id":"36dea0ff5dc4d29725f7600d33ded77ed33dc489","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":"Здесь правильный тест. Почем также не сделал в  тестах для AnswersController?","created_at":"2015-06-15T10:07:44Z","updated_at":"2015-06-15T10:07:44Z","html_url":"https://github.com/dimarikpro/qna2/pull/2#discussion_r32406398","pull_request_url":"https://api.github.com/repos/dimarikpro/qna2/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/comments/32406398"},"html":{"href":"https://github.com/dimarikpro/qna2/pull/2#discussion_r32406398"},"pull_request":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/dimarikpro/qna2/pulls/2","id":37435068,"html_url":"https://github.com/dimarikpro/qna2/pull/2","diff_url":"https://github.com/dimarikpro/qna2/pull/2.diff","patch_url":"https://github.com/dimarikpro/qna2/pull/2.patch","issue_url":"https://api.github.com/repos/dimarikpro/qna2/issues/2","number":2,"state":"open","locked":false,"title":"Lesson5","user":{"login":"dimarikpro","id":5265647,"avatar_url":"https://avatars.githubusercontent.com/u/5265647?v=3","gravatar_id":"","url":"https://api.github.com/users/dimarikpro","html_url":"https://github.com/dimarikpro","followers_url":"https://api.github.com/users/dimarikpro/followers","following_url":"https://api.github.com/users/dimarikpro/following{/other_user}","gists_url":"https://api.github.com/users/dimarikpro/gists{/gist_id}","starred_url":"https://api.github.com/users/dimarikpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimarikpro/subscriptions","organizations_url":"https://api.github.com/users/dimarikpro/orgs","repos_url":"https://api.github.com/users/dimarikpro/repos","events_url":"https://api.github.com/users/dimarikpro/events{/privacy}","received_events_url":"https://api.github.com/users/dimarikpro/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-11T07:16:11Z","updated_at":"2015-06-15T10:07:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01510fa4e6032348ea24aa6f25615f07b9266f6a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dimarikpro/qna2/pulls/2/commits","review_comments_url":"https://api.github.com/repos/dimarikpro/qna2/pulls/2/comments","review_comment_url":"https://api.github.com/repos/dimarikpro/qna2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimarikpro/qna2/issues/2/comments","statuses_url":"https://api.github.com/repos/dimarikpro/qna2/statuses/36dea0ff5dc4d29725f7600d33ded77ed33dc489","head":{"label":"dimarikpro:lesson5","ref":"lesson5","sha":"36dea0ff5dc4d29725f7600d33ded77ed33dc489","user":{"login":"dimarikpro","id":5265647,"avatar_url":"https://avatars.githubusercontent.com/u/5265647?v=3","gravatar_id":"","url":"https://api.github.com/users/dimarikpro","html_url":"https://github.com/dimarikpro","followers_url":"https://api.github.com/users/dimarikpro/followers","following_url":"https://api.github.com/users/dimarikpro/following{/other_user}","gists_url":"https://api.github.com/users/dimarikpro/gists{/gist_id}","starred_url":"https://api.github.com/users/dimarikpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimarikpro/subscriptions","organizations_url":"https://api.github.com/users/dimarikpro/orgs","repos_url":"https://api.github.com/users/dimarikpro/repos","events_url":"https://api.github.com/users/dimarikpro/events{/privacy}","received_events_url":"https://api.github.com/users/dimarikpro/received_events","type":"User","site_admin":false},"repo":{"id":36830241,"name":"qna2","full_name":"dimarikpro/qna2","owner":{"login":"dimarikpro","id":5265647,"avatar_url":"https://avatars.githubusercontent.com/u/5265647?v=3","gravatar_id":"","url":"https://api.github.com/users/dimarikpro","html_url":"https://github.com/dimarikpro","followers_url":"https://api.github.com/users/dimarikpro/followers","following_url":"https://api.github.com/users/dimarikpro/following{/other_user}","gists_url":"https://api.github.com/users/dimarikpro/gists{/gist_id}","starred_url":"https://api.github.com/users/dimarikpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimarikpro/subscriptions","organizations_url":"https://api.github.com/users/dimarikpro/orgs","repos_url":"https://api.github.com/users/dimarikpro/repos","events_url":"https://api.github.com/users/dimarikpro/events{/privacy}","received_events_url":"https://api.github.com/users/dimarikpro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dimarikpro/qna2","description":"","fork":false,"url":"https://api.github.com/repos/dimarikpro/qna2","forks_url":"https://api.github.com/repos/dimarikpro/qna2/forks","keys_url":"https://api.github.com/repos/dimarikpro/qna2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimarikpro/qna2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimarikpro/qna2/teams","hooks_url":"https://api.github.com/repos/dimarikpro/qna2/hooks","issue_events_url":"https://api.github.com/repos/dimarikpro/qna2/issues/events{/number}","events_url":"https://api.github.com/repos/dimarikpro/qna2/events","assignees_url":"https://api.github.com/repos/dimarikpro/qna2/assignees{/user}","branches_url":"https://api.github.com/repos/dimarikpro/qna2/branches{/branch}","tags_url":"https://api.github.com/repos/dimarikpro/qna2/tags","blobs_url":"https://api.github.com/repos/dimarikpro/qna2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimarikpro/qna2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimarikpro/qna2/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimarikpro/qna2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimarikpro/qna2/statuses/{sha}","languages_url":"https://api.github.com/repos/dimarikpro/qna2/languages","stargazers_url":"https://api.github.com/repos/dimarikpro/qna2/stargazers","contributors_url":"https://api.github.com/repos/dimarikpro/qna2/contributors","subscribers_url":"https://api.github.com/repos/dimarikpro/qna2/subscribers","subscription_url":"https://api.github.com/repos/dimarikpro/qna2/subscription","commits_url":"https://api.github.com/repos/dimarikpro/qna2/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimarikpro/qna2/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimarikpro/qna2/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimarikpro/qna2/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimarikpro/qna2/contents/{+path}","compare_url":"https://api.github.com/repos/dimarikpro/qna2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimarikpro/qna2/merges","archive_url":"https://api.github.com/repos/dimarikpro/qna2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimarikpro/qna2/downloads","issues_url":"https://api.github.com/repos/dimarikpro/qna2/issues{/number}","pulls_url":"https://api.github.com/repos/dimarikpro/qna2/pulls{/number}","milestones_url":"https://api.github.com/repos/dimarikpro/qna2/milestones{/number}","notifications_url":"https://api.github.com/repos/dimarikpro/qna2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimarikpro/qna2/labels{/name}","releases_url":"https://api.github.com/repos/dimarikpro/qna2/releases{/id}","created_at":"2015-06-03T20:58:57Z","updated_at":"2015-06-03T20:59:41Z","pushed_at":"2015-06-14T06:09:23Z","git_url":"git://github.com/dimarikpro/qna2.git","ssh_url":"git@github.com:dimarikpro/qna2.git","clone_url":"https://github.com/dimarikpro/qna2.git","svn_url":"https://github.com/dimarikpro/qna2","homepage":null,"size":220,"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":"dimarikpro:master","ref":"master","sha":"e06547a6247626e5ee5903d1c09b6c9f3be3e5ae","user":{"login":"dimarikpro","id":5265647,"avatar_url":"https://avatars.githubusercontent.com/u/5265647?v=3","gravatar_id":"","url":"https://api.github.com/users/dimarikpro","html_url":"https://github.com/dimarikpro","followers_url":"https://api.github.com/users/dimarikpro/followers","following_url":"https://api.github.com/users/dimarikpro/following{/other_user}","gists_url":"https://api.github.com/users/dimarikpro/gists{/gist_id}","starred_url":"https://api.github.com/users/dimarikpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimarikpro/subscriptions","organizations_url":"https://api.github.com/users/dimarikpro/orgs","repos_url":"https://api.github.com/users/dimarikpro/repos","events_url":"https://api.github.com/users/dimarikpro/events{/privacy}","received_events_url":"https://api.github.com/users/dimarikpro/received_events","type":"User","site_admin":false},"repo":{"id":36830241,"name":"qna2","full_name":"dimarikpro/qna2","owner":{"login":"dimarikpro","id":5265647,"avatar_url":"https://avatars.githubusercontent.com/u/5265647?v=3","gravatar_id":"","url":"https://api.github.com/users/dimarikpro","html_url":"https://github.com/dimarikpro","followers_url":"https://api.github.com/users/dimarikpro/followers","following_url":"https://api.github.com/users/dimarikpro/following{/other_user}","gists_url":"https://api.github.com/users/dimarikpro/gists{/gist_id}","starred_url":"https://api.github.com/users/dimarikpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimarikpro/subscriptions","organizations_url":"https://api.github.com/users/dimarikpro/orgs","repos_url":"https://api.github.com/users/dimarikpro/repos","events_url":"https://api.github.com/users/dimarikpro/events{/privacy}","received_events_url":"https://api.github.com/users/dimarikpro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dimarikpro/qna2","description":"","fork":false,"url":"https://api.github.com/repos/dimarikpro/qna2","forks_url":"https://api.github.com/repos/dimarikpro/qna2/forks","keys_url":"https://api.github.com/repos/dimarikpro/qna2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimarikpro/qna2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimarikpro/qna2/teams","hooks_url":"https://api.github.com/repos/dimarikpro/qna2/hooks","issue_events_url":"https://api.github.com/repos/dimarikpro/qna2/issues/events{/number}","events_url":"https://api.github.com/repos/dimarikpro/qna2/events","assignees_url":"https://api.github.com/repos/dimarikpro/qna2/assignees{/user}","branches_url":"https://api.github.com/repos/dimarikpro/qna2/branches{/branch}","tags_url":"https://api.github.com/repos/dimarikpro/qna2/tags","blobs_url":"https://api.github.com/repos/dimarikpro/qna2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimarikpro/qna2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimarikpro/qna2/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimarikpro/qna2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimarikpro/qna2/statuses/{sha}","languages_url":"https://api.github.com/repos/dimarikpro/qna2/languages","stargazers_url":"https://api.github.com/repos/dimarikpro/qna2/stargazers","contributors_url":"https://api.github.com/repos/dimarikpro/qna2/contributors","subscribers_url":"https://api.github.com/repos/dimarikpro/qna2/subscribers","subscription_url":"https://api.github.com/repos/dimarikpro/qna2/subscription","commits_url":"https://api.github.com/repos/dimarikpro/qna2/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimarikpro/qna2/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimarikpro/qna2/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimarikpro/qna2/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimarikpro/qna2/contents/{+path}","compare_url":"https://api.github.com/repos/dimarikpro/qna2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimarikpro/qna2/merges","archive_url":"https://api.github.com/repos/dimarikpro/qna2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimarikpro/qna2/downloads","issues_url":"https://api.github.com/repos/dimarikpro/qna2/issues{/number}","pulls_url":"https://api.github.com/repos/dimarikpro/qna2/pulls{/number}","milestones_url":"https://api.github.com/repos/dimarikpro/qna2/milestones{/number}","notifications_url":"https://api.github.com/repos/dimarikpro/qna2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimarikpro/qna2/labels{/name}","releases_url":"https://api.github.com/repos/dimarikpro/qna2/releases{/id}","created_at":"2015-06-03T20:58:57Z","updated_at":"2015-06-03T20:59:41Z","pushed_at":"2015-06-14T06:09:23Z","git_url":"git://github.com/dimarikpro/qna2.git","ssh_url":"git@github.com:dimarikpro/qna2.git","clone_url":"https://github.com/dimarikpro/qna2.git","svn_url":"https://github.com/dimarikpro/qna2","homepage":null,"size":220,"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/dimarikpro/qna2/pulls/2"},"html":{"href":"https://github.com/dimarikpro/qna2/pull/2"},"issue":{"href":"https://api.github.com/repos/dimarikpro/qna2/issues/2"},"comments":{"href":"https://api.github.com/repos/dimarikpro/qna2/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimarikpro/qna2/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/dimarikpro/qna2/statuses/36dea0ff5dc4d29725f7600d33ded77ed33dc489"}}}}