{"action":"created","comment":{"url":"https://api.github.com/repos/wolox-training/ej-rails/pulls/comments/218436276","pull_request_review_id":156370543,"id":218436276,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODQzNjI3Ng==","diff_hunk":"@@ -0,0 +1,170 @@\n+# frozen_string_literal: true\n+\n+require 'rails_helper'\n+\n+RSpec.describe RentsController do\n+  include_context 'Authenticated User'\n+\n+  describe 'GET #create' do\n+    context 'When creating a rent for an user' do\n+      let!(:user) { create(:user) }\n+      let!(:book) { create(:book) }\n+      let!(:rent) { attributes_for(:rent, book_id: book.id) }\n+      before do\n+        post :create, params: { user_id: user.id, rent: rent }\n+      end\n+\n+      it 'returns http success' do\n+        expect(response).to have_http_status(:success)\n+      end\n+\n+      it 'responds with the created rent' do\n+        expect(response_body).to have_key('loan')","path":"spec/controllers/rents_controller_spec.rb","position":22,"original_position":22,"commit_id":"f0b49001eea44c39a7f1bc9320c6b444264dad7d","original_commit_id":"f0b49001eea44c39a7f1bc9320c6b444264dad7d","user":{"login":"mtejedorwolox","id":26874630,"node_id":"MDQ6VXNlcjI2ODc0NjMw","avatar_url":"https://avatars3.githubusercontent.com/u/26874630?v=4","gravatar_id":"","url":"https://api.github.com/users/mtejedorwolox","html_url":"https://github.com/mtejedorwolox","followers_url":"https://api.github.com/users/mtejedorwolox/followers","following_url":"https://api.github.com/users/mtejedorwolox/following{/other_user}","gists_url":"https://api.github.com/users/mtejedorwolox/gists{/gist_id}","starred_url":"https://api.github.com/users/mtejedorwolox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtejedorwolox/subscriptions","organizations_url":"https://api.github.com/users/mtejedorwolox/orgs","repos_url":"https://api.github.com/users/mtejedorwolox/repos","events_url":"https://api.github.com/users/mtejedorwolox/events{/privacy}","received_events_url":"https://api.github.com/users/mtejedorwolox/received_events","type":"User","site_admin":false},"body":"I think is not necessary to respond with the rent, since was the frontend the one who gives you the data","created_at":"2018-09-18T13:41:49Z","updated_at":"2018-09-18T13:49:32Z","html_url":"https://github.com/wolox-training/ej-rails/pull/16#discussion_r218436276","pull_request_url":"https://api.github.com/repos/wolox-training/ej-rails/pulls/16","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/wolox-training/ej-rails/pulls/comments/218436276"},"html":{"href":"https://github.com/wolox-training/ej-rails/pull/16#discussion_r218436276"},"pull_request":{"href":"https://api.github.com/repos/wolox-training/ej-rails/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/wolox-training/ej-rails/pulls/16","id":215699935,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1Njk5OTM1","html_url":"https://github.com/wolox-training/ej-rails/pull/16","diff_url":"https://github.com/wolox-training/ej-rails/pull/16.diff","patch_url":"https://github.com/wolox-training/ej-rails/pull/16.patch","issue_url":"https://api.github.com/repos/wolox-training/ej-rails/issues/16","number":16,"state":"open","locked":false,"title":"Create rent endpoints","user":{"login":"edkajimenez","id":42581828,"node_id":"MDQ6VXNlcjQyNTgxODI4","avatar_url":"https://avatars1.githubusercontent.com/u/42581828?v=4","gravatar_id":"","url":"https://api.github.com/users/edkajimenez","html_url":"https://github.com/edkajimenez","followers_url":"https://api.github.com/users/edkajimenez/followers","following_url":"https://api.github.com/users/edkajimenez/following{/other_user}","gists_url":"https://api.github.com/users/edkajimenez/gists{/gist_id}","starred_url":"https://api.github.com/users/edkajimenez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edkajimenez/subscriptions","organizations_url":"https://api.github.com/users/edkajimenez/orgs","repos_url":"https://api.github.com/users/edkajimenez/repos","events_url":"https://api.github.com/users/edkajimenez/events{/privacy}","received_events_url":"https://api.github.com/users/edkajimenez/received_events","type":"User","site_admin":false},"body":"## Summary \r\n- INDEX users/id/rents endpoint created\r\n- INDEX books/id/rents endpoint created\r\n- CREATE users/id/rents endpoint created\r\n- Rents Controller and tests\r\n\r\n## Trello Card\r\nhttps://trello.com/c/8N7dUxRB/32-crear-endpoint-de-creacion-de-rent-e-index","created_at":"2018-09-14T20:16:09Z","updated_at":"2018-09-18T13:49:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d2afca75c9f2e50d7a5bf8a8c965c963f162333","assignee":{"login":"icoluccio","id":349676,"node_id":"MDQ6VXNlcjM0OTY3Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/349676?v=4","gravatar_id":"","url":"https://api.github.com/users/icoluccio","html_url":"https://github.com/icoluccio","followers_url":"https://api.github.com/users/icoluccio/followers","following_url":"https://api.github.com/users/icoluccio/following{/other_user}","gists_url":"https://api.github.com/users/icoluccio/gists{/gist_id}","starred_url":"https://api.github.com/users/icoluccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icoluccio/subscriptions","organizations_url":"https://api.github.com/users/icoluccio/orgs","repos_url":"https://api.github.com/users/icoluccio/repos","events_url":"https://api.github.com/users/icoluccio/events{/privacy}","received_events_url":"https://api.github.com/users/icoluccio/received_events","type":"User","site_admin":false},"assignees":[{"login":"icoluccio","id":349676,"node_id":"MDQ6VXNlcjM0OTY3Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/349676?v=4","gravatar_id":"","url":"https://api.github.com/users/icoluccio","html_url":"https://github.com/icoluccio","followers_url":"https://api.github.com/users/icoluccio/followers","following_url":"https://api.github.com/users/icoluccio/following{/other_user}","gists_url":"https://api.github.com/users/icoluccio/gists{/gist_id}","starred_url":"https://api.github.com/users/icoluccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icoluccio/subscriptions","organizations_url":"https://api.github.com/users/icoluccio/orgs","repos_url":"https://api.github.com/users/icoluccio/repos","events_url":"https://api.github.com/users/icoluccio/events{/privacy}","received_events_url":"https://api.github.com/users/icoluccio/received_events","type":"User","site_admin":false},{"login":"mtejedorwolox","id":26874630,"node_id":"MDQ6VXNlcjI2ODc0NjMw","avatar_url":"https://avatars3.githubusercontent.com/u/26874630?v=4","gravatar_id":"","url":"https://api.github.com/users/mtejedorwolox","html_url":"https://github.com/mtejedorwolox","followers_url":"https://api.github.com/users/mtejedorwolox/followers","following_url":"https://api.github.com/users/mtejedorwolox/following{/other_user}","gists_url":"https://api.github.com/users/mtejedorwolox/gists{/gist_id}","starred_url":"https://api.github.com/users/mtejedorwolox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtejedorwolox/subscriptions","organizations_url":"https://api.github.com/users/mtejedorwolox/orgs","repos_url":"https://api.github.com/users/mtejedorwolox/repos","events_url":"https://api.github.com/users/mtejedorwolox/events{/privacy}","received_events_url":"https://api.github.com/users/mtejedorwolox/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wolox-training/ej-rails/pulls/16/commits","review_comments_url":"https://api.github.com/repos/wolox-training/ej-rails/pulls/16/comments","review_comment_url":"https://api.github.com/repos/wolox-training/ej-rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wolox-training/ej-rails/issues/16/comments","statuses_url":"https://api.github.com/repos/wolox-training/ej-rails/statuses/f0b49001eea44c39a7f1bc9320c6b444264dad7d","head":{"label":"wolox-training:create-rent-endpoints","ref":"create-rent-endpoints","sha":"f0b49001eea44c39a7f1bc9320c6b444264dad7d","user":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":145145094,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxNDUwOTQ=","name":"ej-rails","full_name":"wolox-training/ej-rails","private":false,"owner":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wolox-training/ej-rails","description":null,"fork":false,"url":"https://api.github.com/repos/wolox-training/ej-rails","forks_url":"https://api.github.com/repos/wolox-training/ej-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/ej-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/ej-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/ej-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/ej-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/ej-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/ej-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/ej-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/ej-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/ej-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/ej-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/ej-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/ej-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/ej-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/ej-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/ej-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/ej-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/ej-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/ej-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/ej-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/ej-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/ej-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/ej-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/ej-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/ej-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/ej-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/ej-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/ej-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/ej-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/ej-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/ej-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/ej-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/ej-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/ej-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/ej-rails/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/ej-rails/deployments","created_at":"2018-08-17T16:48:23Z","updated_at":"2018-08-28T18:42:13Z","pushed_at":"2018-09-14T20:16:09Z","git_url":"git://github.com/wolox-training/ej-rails.git","ssh_url":"git@github.com:wolox-training/ej-rails.git","clone_url":"https://github.com/wolox-training/ej-rails.git","svn_url":"https://github.com/wolox-training/ej-rails","homepage":null,"size":79,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"wolox-training:development","ref":"development","sha":"0bc3f375e55c75bae1adf380a0c9b70aa6965ab1","user":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":145145094,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxNDUwOTQ=","name":"ej-rails","full_name":"wolox-training/ej-rails","private":false,"owner":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wolox-training/ej-rails","description":null,"fork":false,"url":"https://api.github.com/repos/wolox-training/ej-rails","forks_url":"https://api.github.com/repos/wolox-training/ej-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/ej-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/ej-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/ej-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/ej-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/ej-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/ej-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/ej-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/ej-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/ej-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/ej-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/ej-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/ej-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/ej-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/ej-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/ej-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/ej-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/ej-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/ej-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/ej-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/ej-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/ej-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/ej-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/ej-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/ej-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/ej-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/ej-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/ej-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/ej-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/ej-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/ej-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/ej-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/ej-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/ej-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/ej-rails/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/ej-rails/deployments","created_at":"2018-08-17T16:48:23Z","updated_at":"2018-08-28T18:42:13Z","pushed_at":"2018-09-14T20:16:09Z","git_url":"git://github.com/wolox-training/ej-rails.git","ssh_url":"git@github.com:wolox-training/ej-rails.git","clone_url":"https://github.com/wolox-training/ej-rails.git","svn_url":"https://github.com/wolox-training/ej-rails","homepage":null,"size":79,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wolox-training/ej-rails/pulls/16"},"html":{"href":"https://github.com/wolox-training/ej-rails/pull/16"},"issue":{"href":"https://api.github.com/repos/wolox-training/ej-rails/issues/16"},"comments":{"href":"https://api.github.com/repos/wolox-training/ej-rails/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/wolox-training/ej-rails/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/wolox-training/ej-rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wolox-training/ej-rails/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/wolox-training/ej-rails/statuses/f0b49001eea44c39a7f1bc9320c6b444264dad7d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mtejedorwolox"}}