{"action":"created","comment":{"url":"https://api.github.com/repos/npolevara/QuFlow/pulls/comments/62658542","id":62658542,"diff_hunk":"@@ -0,0 +1,60 @@\n+require 'rails_helper'\n+\n+describe QuestionsController do\n+\n+  let(:question) { create(:question) }\n+\n+  describe 'GET #index' do\n+    let(:questions) { create_list(:question, 10) }\n+\n+    before { get :index }\n+\n+    it 'check the questions list in questions table' do\n+      expect(assigns(:questions)).to match_array(questions)\n+    end\n+\n+    it 'create #index view' do\n+      expect(response).to render_template :index\n+    end\n+  end\n+\n+  describe 'POST #create' do\n+    context 'with valid attributes' do\n+      it 'should create a new question in database' do\n+        expect { post :create, question: attributes_for(:question) }\n+        .to change(Question, :count)\n+        .by(1)\n+      end\n+\n+      it 'should redirect to created question' do\n+        post :create, question: attributes_for(:question)\n+        expect(response).to redirect_to question_path(assigns(:question))\n+      end\n+    end\n+\n+    context 'with invalid attributes' do\n+      before { get :new }\n+      it 'should not create a new question in database' do\n+        expect { post :create, question: attributes_for(:wrong_question) }\n+        .to_not change(Question, :count)\n+      end\n+\n+      it 'should redirect to #new' do\n+        post :create, question: attributes_for(:wrong_question)\n+        expect(response).to render_template :new\n+      end\n+    end\n+  end\n+\n+  describe 'GET #new' do\n+    before { get :new }\n+    it 'should assign new question to @question' do\n+      expect(assigns(:question)).to be_a_new(Question)\n+    end\n+\n+    it ' should render #new view' do\n+      expect(response).to render_template :new\n+    end\n+  end\n+","path":"spec/controllers/questions_controller_spec.rb","position":59,"original_position":59,"commit_id":"6cf5a5b2c00a5b3a2434ac08217844c0b7ceadb5","original_commit_id":"6cf5a5b2c00a5b3a2434ac08217844c0b7ceadb5","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Extra empty line detected at block body end.","created_at":"2016-05-10T12:03:41Z","updated_at":"2016-05-10T12:03:41Z","html_url":"https://github.com/npolevara/QuFlow/pull/2#discussion_r62658542","pull_request_url":"https://api.github.com/repos/npolevara/QuFlow/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/npolevara/QuFlow/pulls/comments/62658542"},"html":{"href":"https://github.com/npolevara/QuFlow/pull/2#discussion_r62658542"},"pull_request":{"href":"https://api.github.com/repos/npolevara/QuFlow/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/npolevara/QuFlow/pulls/2","id":69494116,"html_url":"https://github.com/npolevara/QuFlow/pull/2","diff_url":"https://github.com/npolevara/QuFlow/pull/2.diff","patch_url":"https://github.com/npolevara/QuFlow/pull/2.patch","issue_url":"https://api.github.com/repos/npolevara/QuFlow/issues/2","number":2,"state":"open","locked":false,"title":"Контроллеры вопросов и ответы","user":{"login":"npolevara","id":5304756,"avatar_url":"https://avatars.githubusercontent.com/u/5304756?v=3","gravatar_id":"","url":"https://api.github.com/users/npolevara","html_url":"https://github.com/npolevara","followers_url":"https://api.github.com/users/npolevara/followers","following_url":"https://api.github.com/users/npolevara/following{/other_user}","gists_url":"https://api.github.com/users/npolevara/gists{/gist_id}","starred_url":"https://api.github.com/users/npolevara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npolevara/subscriptions","organizations_url":"https://api.github.com/users/npolevara/orgs","repos_url":"https://api.github.com/users/npolevara/repos","events_url":"https://api.github.com/users/npolevara/events{/privacy}","received_events_url":"https://api.github.com/users/npolevara/received_events","type":"User","site_admin":false},"body":"И тесты к ним","created_at":"2016-05-10T12:03:28Z","updated_at":"2016-05-10T12:03:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df3650162b6a20f088ecab26cd9abeddbbd79733","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/npolevara/QuFlow/pulls/2/commits","review_comments_url":"https://api.github.com/repos/npolevara/QuFlow/pulls/2/comments","review_comment_url":"https://api.github.com/repos/npolevara/QuFlow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/npolevara/QuFlow/issues/2/comments","statuses_url":"https://api.github.com/repos/npolevara/QuFlow/statuses/6cf5a5b2c00a5b3a2434ac08217844c0b7ceadb5","head":{"label":"npolevara:questions_control","ref":"questions_control","sha":"6cf5a5b2c00a5b3a2434ac08217844c0b7ceadb5","user":{"login":"npolevara","id":5304756,"avatar_url":"https://avatars.githubusercontent.com/u/5304756?v=3","gravatar_id":"","url":"https://api.github.com/users/npolevara","html_url":"https://github.com/npolevara","followers_url":"https://api.github.com/users/npolevara/followers","following_url":"https://api.github.com/users/npolevara/following{/other_user}","gists_url":"https://api.github.com/users/npolevara/gists{/gist_id}","starred_url":"https://api.github.com/users/npolevara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npolevara/subscriptions","organizations_url":"https://api.github.com/users/npolevara/orgs","repos_url":"https://api.github.com/users/npolevara/repos","events_url":"https://api.github.com/users/npolevara/events{/privacy}","received_events_url":"https://api.github.com/users/npolevara/received_events","type":"User","site_admin":false},"repo":{"id":57029368,"name":"QuFlow","full_name":"npolevara/QuFlow","owner":{"login":"npolevara","id":5304756,"avatar_url":"https://avatars.githubusercontent.com/u/5304756?v=3","gravatar_id":"","url":"https://api.github.com/users/npolevara","html_url":"https://github.com/npolevara","followers_url":"https://api.github.com/users/npolevara/followers","following_url":"https://api.github.com/users/npolevara/following{/other_user}","gists_url":"https://api.github.com/users/npolevara/gists{/gist_id}","starred_url":"https://api.github.com/users/npolevara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npolevara/subscriptions","organizations_url":"https://api.github.com/users/npolevara/orgs","repos_url":"https://api.github.com/users/npolevara/repos","events_url":"https://api.github.com/users/npolevara/events{/privacy}","received_events_url":"https://api.github.com/users/npolevara/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/npolevara/QuFlow","description":"Questions Flow study project","fork":false,"url":"https://api.github.com/repos/npolevara/QuFlow","forks_url":"https://api.github.com/repos/npolevara/QuFlow/forks","keys_url":"https://api.github.com/repos/npolevara/QuFlow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/npolevara/QuFlow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/npolevara/QuFlow/teams","hooks_url":"https://api.github.com/repos/npolevara/QuFlow/hooks","issue_events_url":"https://api.github.com/repos/npolevara/QuFlow/issues/events{/number}","events_url":"https://api.github.com/repos/npolevara/QuFlow/events","assignees_url":"https://api.github.com/repos/npolevara/QuFlow/assignees{/user}","branches_url":"https://api.github.com/repos/npolevara/QuFlow/branches{/branch}","tags_url":"https://api.github.com/repos/npolevara/QuFlow/tags","blobs_url":"https://api.github.com/repos/npolevara/QuFlow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/npolevara/QuFlow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/npolevara/QuFlow/git/refs{/sha}","trees_url":"https://api.github.com/repos/npolevara/QuFlow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/npolevara/QuFlow/statuses/{sha}","languages_url":"https://api.github.com/repos/npolevara/QuFlow/languages","stargazers_url":"https://api.github.com/repos/npolevara/QuFlow/stargazers","contributors_url":"https://api.github.com/repos/npolevara/QuFlow/contributors","subscribers_url":"https://api.github.com/repos/npolevara/QuFlow/subscribers","subscription_url":"https://api.github.com/repos/npolevara/QuFlow/subscription","commits_url":"https://api.github.com/repos/npolevara/QuFlow/commits{/sha}","git_commits_url":"https://api.github.com/repos/npolevara/QuFlow/git/commits{/sha}","comments_url":"https://api.github.com/repos/npolevara/QuFlow/comments{/number}","issue_comment_url":"https://api.github.com/repos/npolevara/QuFlow/issues/comments{/number}","contents_url":"https://api.github.com/repos/npolevara/QuFlow/contents/{+path}","compare_url":"https://api.github.com/repos/npolevara/QuFlow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/npolevara/QuFlow/merges","archive_url":"https://api.github.com/repos/npolevara/QuFlow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/npolevara/QuFlow/downloads","issues_url":"https://api.github.com/repos/npolevara/QuFlow/issues{/number}","pulls_url":"https://api.github.com/repos/npolevara/QuFlow/pulls{/number}","milestones_url":"https://api.github.com/repos/npolevara/QuFlow/milestones{/number}","notifications_url":"https://api.github.com/repos/npolevara/QuFlow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/npolevara/QuFlow/labels{/name}","releases_url":"https://api.github.com/repos/npolevara/QuFlow/releases{/id}","deployments_url":"https://api.github.com/repos/npolevara/QuFlow/deployments","created_at":"2016-04-25T09:29:49Z","updated_at":"2016-04-25T09:49:13Z","pushed_at":"2016-05-10T12:03:29Z","git_url":"git://github.com/npolevara/QuFlow.git","ssh_url":"git@github.com:npolevara/QuFlow.git","clone_url":"https://github.com/npolevara/QuFlow.git","svn_url":"https://github.com/npolevara/QuFlow","homepage":null,"size":45,"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":"npolevara:master","ref":"master","sha":"a048df8575f6b6cf5758dc7342cd0acbde28c69a","user":{"login":"npolevara","id":5304756,"avatar_url":"https://avatars.githubusercontent.com/u/5304756?v=3","gravatar_id":"","url":"https://api.github.com/users/npolevara","html_url":"https://github.com/npolevara","followers_url":"https://api.github.com/users/npolevara/followers","following_url":"https://api.github.com/users/npolevara/following{/other_user}","gists_url":"https://api.github.com/users/npolevara/gists{/gist_id}","starred_url":"https://api.github.com/users/npolevara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npolevara/subscriptions","organizations_url":"https://api.github.com/users/npolevara/orgs","repos_url":"https://api.github.com/users/npolevara/repos","events_url":"https://api.github.com/users/npolevara/events{/privacy}","received_events_url":"https://api.github.com/users/npolevara/received_events","type":"User","site_admin":false},"repo":{"id":57029368,"name":"QuFlow","full_name":"npolevara/QuFlow","owner":{"login":"npolevara","id":5304756,"avatar_url":"https://avatars.githubusercontent.com/u/5304756?v=3","gravatar_id":"","url":"https://api.github.com/users/npolevara","html_url":"https://github.com/npolevara","followers_url":"https://api.github.com/users/npolevara/followers","following_url":"https://api.github.com/users/npolevara/following{/other_user}","gists_url":"https://api.github.com/users/npolevara/gists{/gist_id}","starred_url":"https://api.github.com/users/npolevara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npolevara/subscriptions","organizations_url":"https://api.github.com/users/npolevara/orgs","repos_url":"https://api.github.com/users/npolevara/repos","events_url":"https://api.github.com/users/npolevara/events{/privacy}","received_events_url":"https://api.github.com/users/npolevara/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/npolevara/QuFlow","description":"Questions Flow study project","fork":false,"url":"https://api.github.com/repos/npolevara/QuFlow","forks_url":"https://api.github.com/repos/npolevara/QuFlow/forks","keys_url":"https://api.github.com/repos/npolevara/QuFlow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/npolevara/QuFlow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/npolevara/QuFlow/teams","hooks_url":"https://api.github.com/repos/npolevara/QuFlow/hooks","issue_events_url":"https://api.github.com/repos/npolevara/QuFlow/issues/events{/number}","events_url":"https://api.github.com/repos/npolevara/QuFlow/events","assignees_url":"https://api.github.com/repos/npolevara/QuFlow/assignees{/user}","branches_url":"https://api.github.com/repos/npolevara/QuFlow/branches{/branch}","tags_url":"https://api.github.com/repos/npolevara/QuFlow/tags","blobs_url":"https://api.github.com/repos/npolevara/QuFlow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/npolevara/QuFlow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/npolevara/QuFlow/git/refs{/sha}","trees_url":"https://api.github.com/repos/npolevara/QuFlow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/npolevara/QuFlow/statuses/{sha}","languages_url":"https://api.github.com/repos/npolevara/QuFlow/languages","stargazers_url":"https://api.github.com/repos/npolevara/QuFlow/stargazers","contributors_url":"https://api.github.com/repos/npolevara/QuFlow/contributors","subscribers_url":"https://api.github.com/repos/npolevara/QuFlow/subscribers","subscription_url":"https://api.github.com/repos/npolevara/QuFlow/subscription","commits_url":"https://api.github.com/repos/npolevara/QuFlow/commits{/sha}","git_commits_url":"https://api.github.com/repos/npolevara/QuFlow/git/commits{/sha}","comments_url":"https://api.github.com/repos/npolevara/QuFlow/comments{/number}","issue_comment_url":"https://api.github.com/repos/npolevara/QuFlow/issues/comments{/number}","contents_url":"https://api.github.com/repos/npolevara/QuFlow/contents/{+path}","compare_url":"https://api.github.com/repos/npolevara/QuFlow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/npolevara/QuFlow/merges","archive_url":"https://api.github.com/repos/npolevara/QuFlow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/npolevara/QuFlow/downloads","issues_url":"https://api.github.com/repos/npolevara/QuFlow/issues{/number}","pulls_url":"https://api.github.com/repos/npolevara/QuFlow/pulls{/number}","milestones_url":"https://api.github.com/repos/npolevara/QuFlow/milestones{/number}","notifications_url":"https://api.github.com/repos/npolevara/QuFlow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/npolevara/QuFlow/labels{/name}","releases_url":"https://api.github.com/repos/npolevara/QuFlow/releases{/id}","deployments_url":"https://api.github.com/repos/npolevara/QuFlow/deployments","created_at":"2016-04-25T09:29:49Z","updated_at":"2016-04-25T09:49:13Z","pushed_at":"2016-05-10T12:03:29Z","git_url":"git://github.com/npolevara/QuFlow.git","ssh_url":"git@github.com:npolevara/QuFlow.git","clone_url":"https://github.com/npolevara/QuFlow.git","svn_url":"https://github.com/npolevara/QuFlow","homepage":null,"size":45,"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/npolevara/QuFlow/pulls/2"},"html":{"href":"https://github.com/npolevara/QuFlow/pull/2"},"issue":{"href":"https://api.github.com/repos/npolevara/QuFlow/issues/2"},"comments":{"href":"https://api.github.com/repos/npolevara/QuFlow/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/npolevara/QuFlow/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/npolevara/QuFlow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/npolevara/QuFlow/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/npolevara/QuFlow/statuses/6cf5a5b2c00a5b3a2434ac08217844c0b7ceadb5"}}}}