{"action":"created","comment":{"url":"https://api.github.com/repos/leandrodzp/target2/pulls/comments/215028649","pull_request_review_id":152205995,"id":215028649,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTAyODY0OQ==","diff_hunk":"@@ -0,0 +1,41 @@\n+require 'rails_helper'\n+\n+describe 'POST api/v1/users', type: :request do\n+  let(:params) { { user: FactoryBot.attributes_for(:user) } }\n+\n+  context 'when all attributes are right' do\n+    it 'return success' do\n+      post user_registration_path, params: params, as: :json\n+      expect(response).to have_http_status(:success)\n+    end\n+\n+    it 'creates user' do\n+      expect do\n+        post user_registration_path, params: params, as: :json\n+      end.to change { User.count }.by(1)\n+    end\n+  end\n+\n+  context 'when the email is not valid' do\n+    before do\n+      params[:user][:email] = 'no_valid'\n+    end","path":"spec/requests/api/v1/users/create_spec.rb","position":22,"original_position":22,"commit_id":"18359a25f44c063a10fde01986eed58b59da7ac4","original_commit_id":"18359a25f44c063a10fde01986eed58b59da7ac4","user":{"login":"grilix","id":263335,"node_id":"MDQ6VXNlcjI2MzMzNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/263335?v=4","gravatar_id":"","url":"https://api.github.com/users/grilix","html_url":"https://github.com/grilix","followers_url":"https://api.github.com/users/grilix/followers","following_url":"https://api.github.com/users/grilix/following{/other_user}","gists_url":"https://api.github.com/users/grilix/gists{/gist_id}","starred_url":"https://api.github.com/users/grilix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grilix/subscriptions","organizations_url":"https://api.github.com/users/grilix/orgs","repos_url":"https://api.github.com/users/grilix/repos","events_url":"https://api.github.com/users/grilix/events{/privacy}","received_events_url":"https://api.github.com/users/grilix/received_events","type":"User","site_admin":false},"body":"Mutating the `let`s could lead to a harder to maintain suite. In cases like this we can, for example, just redeclare the let:\r\n\r\n```ruby\r\nlet(:params) do\r\n  { user: FactoryBot.attributes_for(:user, email: 'no_valid') }\r\nend\r\n```","created_at":"2018-09-04T18:53:40Z","updated_at":"2018-09-04T18:53:41Z","html_url":"https://github.com/leandrodzp/target2/pull/1#discussion_r215028649","pull_request_url":"https://api.github.com/repos/leandrodzp/target2/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/leandrodzp/target2/pulls/comments/215028649"},"html":{"href":"https://github.com/leandrodzp/target2/pull/1#discussion_r215028649"},"pull_request":{"href":"https://api.github.com/repos/leandrodzp/target2/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/leandrodzp/target2/pulls/1","id":212156638,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMTU2NjM4","html_url":"https://github.com/leandrodzp/target2/pull/1","diff_url":"https://github.com/leandrodzp/target2/pull/1.diff","patch_url":"https://github.com/leandrodzp/target2/pull/1.patch","issue_url":"https://api.github.com/repos/leandrodzp/target2/issues/1","number":1,"state":"open","locked":false,"title":"Add sign up feature","user":{"login":"leandrodzp","id":42643389,"node_id":"MDQ6VXNlcjQyNjQzMzg5","avatar_url":"https://avatars3.githubusercontent.com/u/42643389?v=4","gravatar_id":"","url":"https://api.github.com/users/leandrodzp","html_url":"https://github.com/leandrodzp","followers_url":"https://api.github.com/users/leandrodzp/followers","following_url":"https://api.github.com/users/leandrodzp/following{/other_user}","gists_url":"https://api.github.com/users/leandrodzp/gists{/gist_id}","starred_url":"https://api.github.com/users/leandrodzp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leandrodzp/subscriptions","organizations_url":"https://api.github.com/users/leandrodzp/orgs","repos_url":"https://api.github.com/users/leandrodzp/repos","events_url":"https://api.github.com/users/leandrodzp/events{/privacy}","received_events_url":"https://api.github.com/users/leandrodzp/received_events","type":"User","site_admin":false},"body":"This PR includes:\r\n  - sign up feature","created_at":"2018-08-30T17:36:27Z","updated_at":"2018-09-04T18:53:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f92c6498af7c7c250643d4aeea1cb243f77e1d15","assignee":null,"assignees":[],"requested_reviewers":[{"login":"santiagovidal","id":11350611,"node_id":"MDQ6VXNlcjExMzUwNjEx","avatar_url":"https://avatars0.githubusercontent.com/u/11350611?v=4","gravatar_id":"","url":"https://api.github.com/users/santiagovidal","html_url":"https://github.com/santiagovidal","followers_url":"https://api.github.com/users/santiagovidal/followers","following_url":"https://api.github.com/users/santiagovidal/following{/other_user}","gists_url":"https://api.github.com/users/santiagovidal/gists{/gist_id}","starred_url":"https://api.github.com/users/santiagovidal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santiagovidal/subscriptions","organizations_url":"https://api.github.com/users/santiagovidal/orgs","repos_url":"https://api.github.com/users/santiagovidal/repos","events_url":"https://api.github.com/users/santiagovidal/events{/privacy}","received_events_url":"https://api.github.com/users/santiagovidal/received_events","type":"User","site_admin":false},{"login":"fedeagripa","id":23194751,"node_id":"MDQ6VXNlcjIzMTk0NzUx","avatar_url":"https://avatars0.githubusercontent.com/u/23194751?v=4","gravatar_id":"","url":"https://api.github.com/users/fedeagripa","html_url":"https://github.com/fedeagripa","followers_url":"https://api.github.com/users/fedeagripa/followers","following_url":"https://api.github.com/users/fedeagripa/following{/other_user}","gists_url":"https://api.github.com/users/fedeagripa/gists{/gist_id}","starred_url":"https://api.github.com/users/fedeagripa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedeagripa/subscriptions","organizations_url":"https://api.github.com/users/fedeagripa/orgs","repos_url":"https://api.github.com/users/fedeagripa/repos","events_url":"https://api.github.com/users/fedeagripa/events{/privacy}","received_events_url":"https://api.github.com/users/fedeagripa/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/leandrodzp/target2/pulls/1/commits","review_comments_url":"https://api.github.com/repos/leandrodzp/target2/pulls/1/comments","review_comment_url":"https://api.github.com/repos/leandrodzp/target2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leandrodzp/target2/issues/1/comments","statuses_url":"https://api.github.com/repos/leandrodzp/target2/statuses/18359a25f44c063a10fde01986eed58b59da7ac4","head":{"label":"leandrodzp:feature/sign-up","ref":"feature/sign-up","sha":"18359a25f44c063a10fde01986eed58b59da7ac4","user":{"login":"leandrodzp","id":42643389,"node_id":"MDQ6VXNlcjQyNjQzMzg5","avatar_url":"https://avatars3.githubusercontent.com/u/42643389?v=4","gravatar_id":"","url":"https://api.github.com/users/leandrodzp","html_url":"https://github.com/leandrodzp","followers_url":"https://api.github.com/users/leandrodzp/followers","following_url":"https://api.github.com/users/leandrodzp/following{/other_user}","gists_url":"https://api.github.com/users/leandrodzp/gists{/gist_id}","starred_url":"https://api.github.com/users/leandrodzp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leandrodzp/subscriptions","organizations_url":"https://api.github.com/users/leandrodzp/orgs","repos_url":"https://api.github.com/users/leandrodzp/repos","events_url":"https://api.github.com/users/leandrodzp/events{/privacy}","received_events_url":"https://api.github.com/users/leandrodzp/received_events","type":"User","site_admin":false},"repo":{"id":146620499,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY2MjA0OTk=","name":"target2","full_name":"leandrodzp/target2","owner":{"login":"leandrodzp","id":42643389,"node_id":"MDQ6VXNlcjQyNjQzMzg5","avatar_url":"https://avatars3.githubusercontent.com/u/42643389?v=4","gravatar_id":"","url":"https://api.github.com/users/leandrodzp","html_url":"https://github.com/leandrodzp","followers_url":"https://api.github.com/users/leandrodzp/followers","following_url":"https://api.github.com/users/leandrodzp/following{/other_user}","gists_url":"https://api.github.com/users/leandrodzp/gists{/gist_id}","starred_url":"https://api.github.com/users/leandrodzp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leandrodzp/subscriptions","organizations_url":"https://api.github.com/users/leandrodzp/orgs","repos_url":"https://api.github.com/users/leandrodzp/repos","events_url":"https://api.github.com/users/leandrodzp/events{/privacy}","received_events_url":"https://api.github.com/users/leandrodzp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leandrodzp/target2","description":"Target app","fork":false,"url":"https://api.github.com/repos/leandrodzp/target2","forks_url":"https://api.github.com/repos/leandrodzp/target2/forks","keys_url":"https://api.github.com/repos/leandrodzp/target2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leandrodzp/target2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leandrodzp/target2/teams","hooks_url":"https://api.github.com/repos/leandrodzp/target2/hooks","issue_events_url":"https://api.github.com/repos/leandrodzp/target2/issues/events{/number}","events_url":"https://api.github.com/repos/leandrodzp/target2/events","assignees_url":"https://api.github.com/repos/leandrodzp/target2/assignees{/user}","branches_url":"https://api.github.com/repos/leandrodzp/target2/branches{/branch}","tags_url":"https://api.github.com/repos/leandrodzp/target2/tags","blobs_url":"https://api.github.com/repos/leandrodzp/target2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leandrodzp/target2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leandrodzp/target2/git/refs{/sha}","trees_url":"https://api.github.com/repos/leandrodzp/target2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leandrodzp/target2/statuses/{sha}","languages_url":"https://api.github.com/repos/leandrodzp/target2/languages","stargazers_url":"https://api.github.com/repos/leandrodzp/target2/stargazers","contributors_url":"https://api.github.com/repos/leandrodzp/target2/contributors","subscribers_url":"https://api.github.com/repos/leandrodzp/target2/subscribers","subscription_url":"https://api.github.com/repos/leandrodzp/target2/subscription","commits_url":"https://api.github.com/repos/leandrodzp/target2/commits{/sha}","git_commits_url":"https://api.github.com/repos/leandrodzp/target2/git/commits{/sha}","comments_url":"https://api.github.com/repos/leandrodzp/target2/comments{/number}","issue_comment_url":"https://api.github.com/repos/leandrodzp/target2/issues/comments{/number}","contents_url":"https://api.github.com/repos/leandrodzp/target2/contents/{+path}","compare_url":"https://api.github.com/repos/leandrodzp/target2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leandrodzp/target2/merges","archive_url":"https://api.github.com/repos/leandrodzp/target2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leandrodzp/target2/downloads","issues_url":"https://api.github.com/repos/leandrodzp/target2/issues{/number}","pulls_url":"https://api.github.com/repos/leandrodzp/target2/pulls{/number}","milestones_url":"https://api.github.com/repos/leandrodzp/target2/milestones{/number}","notifications_url":"https://api.github.com/repos/leandrodzp/target2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leandrodzp/target2/labels{/name}","releases_url":"https://api.github.com/repos/leandrodzp/target2/releases{/id}","deployments_url":"https://api.github.com/repos/leandrodzp/target2/deployments","created_at":"2018-08-29T15:27:02Z","updated_at":"2018-09-04T18:06:50Z","pushed_at":"2018-09-04T18:22:41Z","git_url":"git://github.com/leandrodzp/target2.git","ssh_url":"git@github.com:leandrodzp/target2.git","clone_url":"https://github.com/leandrodzp/target2.git","svn_url":"https://github.com/leandrodzp/target2","homepage":null,"size":145,"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,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"development"}},"base":{"label":"leandrodzp:development","ref":"development","sha":"60a627b443f15f1805e4c8d3102ad97dc381aee4","user":{"login":"leandrodzp","id":42643389,"node_id":"MDQ6VXNlcjQyNjQzMzg5","avatar_url":"https://avatars3.githubusercontent.com/u/42643389?v=4","gravatar_id":"","url":"https://api.github.com/users/leandrodzp","html_url":"https://github.com/leandrodzp","followers_url":"https://api.github.com/users/leandrodzp/followers","following_url":"https://api.github.com/users/leandrodzp/following{/other_user}","gists_url":"https://api.github.com/users/leandrodzp/gists{/gist_id}","starred_url":"https://api.github.com/users/leandrodzp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leandrodzp/subscriptions","organizations_url":"https://api.github.com/users/leandrodzp/orgs","repos_url":"https://api.github.com/users/leandrodzp/repos","events_url":"https://api.github.com/users/leandrodzp/events{/privacy}","received_events_url":"https://api.github.com/users/leandrodzp/received_events","type":"User","site_admin":false},"repo":{"id":146620499,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY2MjA0OTk=","name":"target2","full_name":"leandrodzp/target2","owner":{"login":"leandrodzp","id":42643389,"node_id":"MDQ6VXNlcjQyNjQzMzg5","avatar_url":"https://avatars3.githubusercontent.com/u/42643389?v=4","gravatar_id":"","url":"https://api.github.com/users/leandrodzp","html_url":"https://github.com/leandrodzp","followers_url":"https://api.github.com/users/leandrodzp/followers","following_url":"https://api.github.com/users/leandrodzp/following{/other_user}","gists_url":"https://api.github.com/users/leandrodzp/gists{/gist_id}","starred_url":"https://api.github.com/users/leandrodzp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leandrodzp/subscriptions","organizations_url":"https://api.github.com/users/leandrodzp/orgs","repos_url":"https://api.github.com/users/leandrodzp/repos","events_url":"https://api.github.com/users/leandrodzp/events{/privacy}","received_events_url":"https://api.github.com/users/leandrodzp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leandrodzp/target2","description":"Target app","fork":false,"url":"https://api.github.com/repos/leandrodzp/target2","forks_url":"https://api.github.com/repos/leandrodzp/target2/forks","keys_url":"https://api.github.com/repos/leandrodzp/target2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leandrodzp/target2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leandrodzp/target2/teams","hooks_url":"https://api.github.com/repos/leandrodzp/target2/hooks","issue_events_url":"https://api.github.com/repos/leandrodzp/target2/issues/events{/number}","events_url":"https://api.github.com/repos/leandrodzp/target2/events","assignees_url":"https://api.github.com/repos/leandrodzp/target2/assignees{/user}","branches_url":"https://api.github.com/repos/leandrodzp/target2/branches{/branch}","tags_url":"https://api.github.com/repos/leandrodzp/target2/tags","blobs_url":"https://api.github.com/repos/leandrodzp/target2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leandrodzp/target2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leandrodzp/target2/git/refs{/sha}","trees_url":"https://api.github.com/repos/leandrodzp/target2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leandrodzp/target2/statuses/{sha}","languages_url":"https://api.github.com/repos/leandrodzp/target2/languages","stargazers_url":"https://api.github.com/repos/leandrodzp/target2/stargazers","contributors_url":"https://api.github.com/repos/leandrodzp/target2/contributors","subscribers_url":"https://api.github.com/repos/leandrodzp/target2/subscribers","subscription_url":"https://api.github.com/repos/leandrodzp/target2/subscription","commits_url":"https://api.github.com/repos/leandrodzp/target2/commits{/sha}","git_commits_url":"https://api.github.com/repos/leandrodzp/target2/git/commits{/sha}","comments_url":"https://api.github.com/repos/leandrodzp/target2/comments{/number}","issue_comment_url":"https://api.github.com/repos/leandrodzp/target2/issues/comments{/number}","contents_url":"https://api.github.com/repos/leandrodzp/target2/contents/{+path}","compare_url":"https://api.github.com/repos/leandrodzp/target2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leandrodzp/target2/merges","archive_url":"https://api.github.com/repos/leandrodzp/target2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leandrodzp/target2/downloads","issues_url":"https://api.github.com/repos/leandrodzp/target2/issues{/number}","pulls_url":"https://api.github.com/repos/leandrodzp/target2/pulls{/number}","milestones_url":"https://api.github.com/repos/leandrodzp/target2/milestones{/number}","notifications_url":"https://api.github.com/repos/leandrodzp/target2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leandrodzp/target2/labels{/name}","releases_url":"https://api.github.com/repos/leandrodzp/target2/releases{/id}","deployments_url":"https://api.github.com/repos/leandrodzp/target2/deployments","created_at":"2018-08-29T15:27:02Z","updated_at":"2018-09-04T18:06:50Z","pushed_at":"2018-09-04T18:22:41Z","git_url":"git://github.com/leandrodzp/target2.git","ssh_url":"git@github.com:leandrodzp/target2.git","clone_url":"https://github.com/leandrodzp/target2.git","svn_url":"https://github.com/leandrodzp/target2","homepage":null,"size":145,"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,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/leandrodzp/target2/pulls/1"},"html":{"href":"https://github.com/leandrodzp/target2/pull/1"},"issue":{"href":"https://api.github.com/repos/leandrodzp/target2/issues/1"},"comments":{"href":"https://api.github.com/repos/leandrodzp/target2/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/leandrodzp/target2/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/leandrodzp/target2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leandrodzp/target2/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/leandrodzp/target2/statuses/18359a25f44c063a10fde01986eed58b59da7ac4"}},"author_association":"OWNER"}}
{"actor":{"display_login":"grilix"}}