{"action":"created","comment":{"url":"https://api.github.com/repos/prio101/realestatetransaction/pulls/comments/123135316","pull_request_review_id":45308962,"id":123135316,"diff_hunk":"@@ -0,0 +1,172 @@\n+require 'rails_helper'\n+\n+RSpec.describe RealEstatesController, type: :controller do\n+  let(:real_estate) { FactoryGirl.create(:real_estate) }\n+  let(:real_estate_instance) { RealEstate }\n+  let(:valid_params) { FactoryGirl.attributes_for(:real_estate) }\n+  let(:invalid_params) { FactoryGirl.attributes_for(:real_estate,\n+                                                    price: 'Some') }\n+  let(:valid_update_attr) { FactoryGirl.attributes_for(:real_estate,\n+                                                       street: 'great wall') }\n+  let(:invalid_update_attr) { FactoryGirl.attributes_for(:real_estate,\n+                                                         street: '') }\n+  describe '#index' do\n+    it 'returns 200 status code' do\n+      get :index\n+      expect(response.status).to eq 200\n+    end\n+\n+    it 'renders index template' do\n+      get :index\n+      expect(response).to render_template 'index'\n+    end\n+\n+    it 'returns the collection of real_estate' do\n+      real_estate\n+      get :index\n+      expect(assigns(:real_estates)).to eq [real_estate]\n+    end\n+  end\n+\n+  describe '#show' do\n+    it 'returns the 200 status code' do\n+      get :show, params: { id: real_estate.id }\n+      expect(response.status).to eq 200\n+    end\n+\n+    it 'renders template show' do\n+      get :show, params: { id: real_estate.id }\n+      expect(response).to render_template 'show'\n+    end\n+\n+    it 'returns the real_estate' do\n+      get :show, params: { id: real_estate.id }\n+      expect(assigns(:real_estate)).to eq real_estate\n+    end\n+  end\n+\n+  describe '#new' do\n+    it 'returns the 200 status code' do\n+      get :new\n+      expect(response.status).to eq 200\n+    end\n+\n+    it 'renders new template' do\n+      get :new\n+      expect(response).to render_template 'new'\n+    end\n+\n+    it 'returns a RealEstate class instance' do\n+      get :new\n+      expect(assigns(:real_estate)).to be_an_instance_of real_estate_instance\n+    end\n+  end\n+\n+  describe '#create' do\n+    context 'with valid params' do\n+      it 'returns the status code 302' do\n+        post :create, params: { real_estate: valid_params }\n+        expect(response.status).to eq 302\n+      end\n+\n+      it 'creates new record' do\n+        expect { post :create, params: { real_estate: valid_params }}\n+            .to change(RealEstate, :count).by(1)\n+      end\n+\n+      it 'returns the success flash message' do\n+        post :create, params: { real_estate: valid_params }\n+        expect(flash[:success]).to eq 'Created'\n+      end\n+\n+      it 'redirect to the real estate page' do\n+        post :create, params: { real_estate: valid_params }\n+        expect(response).to redirect_to \"/real_estates/#{assigns(:real_estate).id}\"\n+      end\n+    end\n+\n+    context 'with invalid params' do\n+      it 'returns the status code 302' do\n+        post :create, params: { real_estate: invalid_params }\n+        expect(response.status).to eq 200\n+      end\n+\n+      it 'renders template new' do\n+        post :create, params: { real_estate: invalid_params }\n+        expect(response).to render_template 'new'\n+      end\n+   end","path":"spec/controllers/real_estates_controller_spec.rb","position":98,"original_position":98,"commit_id":"806149947d3c93428885c238044c57f4b87c41fd","original_commit_id":"806149947d3c93428885c238044c57f4b87c41fd","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars3.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":"end at 98, 3 is not aligned with context 'with invalid params' do at 88, 4.","created_at":"2017-06-21T01:24:32Z","updated_at":"2017-06-21T01:24:32Z","html_url":"https://github.com/prio101/realestatetransaction/pull/7#discussion_r123135316","pull_request_url":"https://api.github.com/repos/prio101/realestatetransaction/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/prio101/realestatetransaction/pulls/comments/123135316"},"html":{"href":"https://github.com/prio101/realestatetransaction/pull/7#discussion_r123135316"},"pull_request":{"href":"https://api.github.com/repos/prio101/realestatetransaction/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/prio101/realestatetransaction/pulls/7","id":126662146,"html_url":"https://github.com/prio101/realestatetransaction/pull/7","diff_url":"https://github.com/prio101/realestatetransaction/pull/7.diff","patch_url":"https://github.com/prio101/realestatetransaction/pull/7.patch","issue_url":"https://api.github.com/repos/prio101/realestatetransaction/issues/7","number":7,"state":"open","locked":false,"title":"Added the Testing","user":{"login":"prio101","id":3279809,"avatar_url":"https://avatars0.githubusercontent.com/u/3279809?v=3","gravatar_id":"","url":"https://api.github.com/users/prio101","html_url":"https://github.com/prio101","followers_url":"https://api.github.com/users/prio101/followers","following_url":"https://api.github.com/users/prio101/following{/other_user}","gists_url":"https://api.github.com/users/prio101/gists{/gist_id}","starred_url":"https://api.github.com/users/prio101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prio101/subscriptions","organizations_url":"https://api.github.com/users/prio101/orgs","repos_url":"https://api.github.com/users/prio101/repos","events_url":"https://api.github.com/users/prio101/events{/privacy}","received_events_url":"https://api.github.com/users/prio101/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-21T01:24:20Z","updated_at":"2017-06-21T01:24:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b790b7c7a46835949f074ed0234893d63d9dab5","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/prio101/realestatetransaction/pulls/7/commits","review_comments_url":"https://api.github.com/repos/prio101/realestatetransaction/pulls/7/comments","review_comment_url":"https://api.github.com/repos/prio101/realestatetransaction/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prio101/realestatetransaction/issues/7/comments","statuses_url":"https://api.github.com/repos/prio101/realestatetransaction/statuses/806149947d3c93428885c238044c57f4b87c41fd","head":{"label":"prio101:test","ref":"test","sha":"806149947d3c93428885c238044c57f4b87c41fd","user":{"login":"prio101","id":3279809,"avatar_url":"https://avatars0.githubusercontent.com/u/3279809?v=3","gravatar_id":"","url":"https://api.github.com/users/prio101","html_url":"https://github.com/prio101","followers_url":"https://api.github.com/users/prio101/followers","following_url":"https://api.github.com/users/prio101/following{/other_user}","gists_url":"https://api.github.com/users/prio101/gists{/gist_id}","starred_url":"https://api.github.com/users/prio101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prio101/subscriptions","organizations_url":"https://api.github.com/users/prio101/orgs","repos_url":"https://api.github.com/users/prio101/repos","events_url":"https://api.github.com/users/prio101/events{/privacy}","received_events_url":"https://api.github.com/users/prio101/received_events","type":"User","site_admin":false},"repo":{"id":94844230,"name":"realestatetransaction","full_name":"prio101/realestatetransaction","owner":{"login":"prio101","id":3279809,"avatar_url":"https://avatars0.githubusercontent.com/u/3279809?v=3","gravatar_id":"","url":"https://api.github.com/users/prio101","html_url":"https://github.com/prio101","followers_url":"https://api.github.com/users/prio101/followers","following_url":"https://api.github.com/users/prio101/following{/other_user}","gists_url":"https://api.github.com/users/prio101/gists{/gist_id}","starred_url":"https://api.github.com/users/prio101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prio101/subscriptions","organizations_url":"https://api.github.com/users/prio101/orgs","repos_url":"https://api.github.com/users/prio101/repos","events_url":"https://api.github.com/users/prio101/events{/privacy}","received_events_url":"https://api.github.com/users/prio101/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prio101/realestatetransaction","description":"A Ruby On Rails Application for Real Estate Data","fork":false,"url":"https://api.github.com/repos/prio101/realestatetransaction","forks_url":"https://api.github.com/repos/prio101/realestatetransaction/forks","keys_url":"https://api.github.com/repos/prio101/realestatetransaction/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prio101/realestatetransaction/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prio101/realestatetransaction/teams","hooks_url":"https://api.github.com/repos/prio101/realestatetransaction/hooks","issue_events_url":"https://api.github.com/repos/prio101/realestatetransaction/issues/events{/number}","events_url":"https://api.github.com/repos/prio101/realestatetransaction/events","assignees_url":"https://api.github.com/repos/prio101/realestatetransaction/assignees{/user}","branches_url":"https://api.github.com/repos/prio101/realestatetransaction/branches{/branch}","tags_url":"https://api.github.com/repos/prio101/realestatetransaction/tags","blobs_url":"https://api.github.com/repos/prio101/realestatetransaction/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prio101/realestatetransaction/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prio101/realestatetransaction/git/refs{/sha}","trees_url":"https://api.github.com/repos/prio101/realestatetransaction/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prio101/realestatetransaction/statuses/{sha}","languages_url":"https://api.github.com/repos/prio101/realestatetransaction/languages","stargazers_url":"https://api.github.com/repos/prio101/realestatetransaction/stargazers","contributors_url":"https://api.github.com/repos/prio101/realestatetransaction/contributors","subscribers_url":"https://api.github.com/repos/prio101/realestatetransaction/subscribers","subscription_url":"https://api.github.com/repos/prio101/realestatetransaction/subscription","commits_url":"https://api.github.com/repos/prio101/realestatetransaction/commits{/sha}","git_commits_url":"https://api.github.com/repos/prio101/realestatetransaction/git/commits{/sha}","comments_url":"https://api.github.com/repos/prio101/realestatetransaction/comments{/number}","issue_comment_url":"https://api.github.com/repos/prio101/realestatetransaction/issues/comments{/number}","contents_url":"https://api.github.com/repos/prio101/realestatetransaction/contents/{+path}","compare_url":"https://api.github.com/repos/prio101/realestatetransaction/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prio101/realestatetransaction/merges","archive_url":"https://api.github.com/repos/prio101/realestatetransaction/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prio101/realestatetransaction/downloads","issues_url":"https://api.github.com/repos/prio101/realestatetransaction/issues{/number}","pulls_url":"https://api.github.com/repos/prio101/realestatetransaction/pulls{/number}","milestones_url":"https://api.github.com/repos/prio101/realestatetransaction/milestones{/number}","notifications_url":"https://api.github.com/repos/prio101/realestatetransaction/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prio101/realestatetransaction/labels{/name}","releases_url":"https://api.github.com/repos/prio101/realestatetransaction/releases{/id}","deployments_url":"https://api.github.com/repos/prio101/realestatetransaction/deployments","created_at":"2017-06-20T03:07:56Z","updated_at":"2017-06-20T03:09:41Z","pushed_at":"2017-06-21T01:24:21Z","git_url":"git://github.com/prio101/realestatetransaction.git","ssh_url":"git@github.com:prio101/realestatetransaction.git","clone_url":"https://github.com/prio101/realestatetransaction.git","svn_url":"https://github.com/prio101/realestatetransaction","homepage":null,"size":103,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":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":"prio101:master","ref":"master","sha":"dfe7f3ba15a0f8c7c74c9a509eb775c1f5a700b8","user":{"login":"prio101","id":3279809,"avatar_url":"https://avatars0.githubusercontent.com/u/3279809?v=3","gravatar_id":"","url":"https://api.github.com/users/prio101","html_url":"https://github.com/prio101","followers_url":"https://api.github.com/users/prio101/followers","following_url":"https://api.github.com/users/prio101/following{/other_user}","gists_url":"https://api.github.com/users/prio101/gists{/gist_id}","starred_url":"https://api.github.com/users/prio101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prio101/subscriptions","organizations_url":"https://api.github.com/users/prio101/orgs","repos_url":"https://api.github.com/users/prio101/repos","events_url":"https://api.github.com/users/prio101/events{/privacy}","received_events_url":"https://api.github.com/users/prio101/received_events","type":"User","site_admin":false},"repo":{"id":94844230,"name":"realestatetransaction","full_name":"prio101/realestatetransaction","owner":{"login":"prio101","id":3279809,"avatar_url":"https://avatars0.githubusercontent.com/u/3279809?v=3","gravatar_id":"","url":"https://api.github.com/users/prio101","html_url":"https://github.com/prio101","followers_url":"https://api.github.com/users/prio101/followers","following_url":"https://api.github.com/users/prio101/following{/other_user}","gists_url":"https://api.github.com/users/prio101/gists{/gist_id}","starred_url":"https://api.github.com/users/prio101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prio101/subscriptions","organizations_url":"https://api.github.com/users/prio101/orgs","repos_url":"https://api.github.com/users/prio101/repos","events_url":"https://api.github.com/users/prio101/events{/privacy}","received_events_url":"https://api.github.com/users/prio101/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prio101/realestatetransaction","description":"A Ruby On Rails Application for Real Estate Data","fork":false,"url":"https://api.github.com/repos/prio101/realestatetransaction","forks_url":"https://api.github.com/repos/prio101/realestatetransaction/forks","keys_url":"https://api.github.com/repos/prio101/realestatetransaction/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prio101/realestatetransaction/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prio101/realestatetransaction/teams","hooks_url":"https://api.github.com/repos/prio101/realestatetransaction/hooks","issue_events_url":"https://api.github.com/repos/prio101/realestatetransaction/issues/events{/number}","events_url":"https://api.github.com/repos/prio101/realestatetransaction/events","assignees_url":"https://api.github.com/repos/prio101/realestatetransaction/assignees{/user}","branches_url":"https://api.github.com/repos/prio101/realestatetransaction/branches{/branch}","tags_url":"https://api.github.com/repos/prio101/realestatetransaction/tags","blobs_url":"https://api.github.com/repos/prio101/realestatetransaction/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prio101/realestatetransaction/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prio101/realestatetransaction/git/refs{/sha}","trees_url":"https://api.github.com/repos/prio101/realestatetransaction/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prio101/realestatetransaction/statuses/{sha}","languages_url":"https://api.github.com/repos/prio101/realestatetransaction/languages","stargazers_url":"https://api.github.com/repos/prio101/realestatetransaction/stargazers","contributors_url":"https://api.github.com/repos/prio101/realestatetransaction/contributors","subscribers_url":"https://api.github.com/repos/prio101/realestatetransaction/subscribers","subscription_url":"https://api.github.com/repos/prio101/realestatetransaction/subscription","commits_url":"https://api.github.com/repos/prio101/realestatetransaction/commits{/sha}","git_commits_url":"https://api.github.com/repos/prio101/realestatetransaction/git/commits{/sha}","comments_url":"https://api.github.com/repos/prio101/realestatetransaction/comments{/number}","issue_comment_url":"https://api.github.com/repos/prio101/realestatetransaction/issues/comments{/number}","contents_url":"https://api.github.com/repos/prio101/realestatetransaction/contents/{+path}","compare_url":"https://api.github.com/repos/prio101/realestatetransaction/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prio101/realestatetransaction/merges","archive_url":"https://api.github.com/repos/prio101/realestatetransaction/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prio101/realestatetransaction/downloads","issues_url":"https://api.github.com/repos/prio101/realestatetransaction/issues{/number}","pulls_url":"https://api.github.com/repos/prio101/realestatetransaction/pulls{/number}","milestones_url":"https://api.github.com/repos/prio101/realestatetransaction/milestones{/number}","notifications_url":"https://api.github.com/repos/prio101/realestatetransaction/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prio101/realestatetransaction/labels{/name}","releases_url":"https://api.github.com/repos/prio101/realestatetransaction/releases{/id}","deployments_url":"https://api.github.com/repos/prio101/realestatetransaction/deployments","created_at":"2017-06-20T03:07:56Z","updated_at":"2017-06-20T03:09:41Z","pushed_at":"2017-06-21T01:24:21Z","git_url":"git://github.com/prio101/realestatetransaction.git","ssh_url":"git@github.com:prio101/realestatetransaction.git","clone_url":"https://github.com/prio101/realestatetransaction.git","svn_url":"https://github.com/prio101/realestatetransaction","homepage":null,"size":103,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":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/prio101/realestatetransaction/pulls/7"},"html":{"href":"https://github.com/prio101/realestatetransaction/pull/7"},"issue":{"href":"https://api.github.com/repos/prio101/realestatetransaction/issues/7"},"comments":{"href":"https://api.github.com/repos/prio101/realestatetransaction/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/prio101/realestatetransaction/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/prio101/realestatetransaction/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prio101/realestatetransaction/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/prio101/realestatetransaction/statuses/806149947d3c93428885c238044c57f4b87c41fd"}}}}
{"actor":{"display_login":"houndci-bot"}}