{"action":"created","comment":{"url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/comments/108703009","pull_request_review_id":29747830,"id":108703009,"diff_hunk":"@@ -271,48 +271,29 @@\n   describe \"#display_pending_documents\" do\n     subject { user.decorate.display_pending_documents }\n \n-    context \"when user is legal entity\" do\n-      let(:user) { create(:user, :legal_entity) }\n-\n-      it { is_expected.to be_nil }\n-    end\n+    before { sign_in user }\n \n-    context \"when user is individual\" do\n-      before { sign_in user }\n-\n-      context \"and has no ID document\" do\n-        let(:user) { create(:user, :without_id_document) }\n+    context \"when user is legal entity\" do","path":"spec/decorators/user_decorator_spec.rb","position":16,"original_position":16,"commit_id":"33dded90da29aa847cd235786dd3449b9b2a9b99","original_commit_id":"33dded90da29aa847cd235786dd3449b9b2a9b99","user":{"login":"Maychell","id":5591247,"avatar_url":"https://avatars0.githubusercontent.com/u/5591247?v=3","gravatar_id":"","url":"https://api.github.com/users/Maychell","html_url":"https://github.com/Maychell","followers_url":"https://api.github.com/users/Maychell/followers","following_url":"https://api.github.com/users/Maychell/following{/other_user}","gists_url":"https://api.github.com/users/Maychell/gists{/gist_id}","starred_url":"https://api.github.com/users/Maychell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maychell/subscriptions","organizations_url":"https://api.github.com/users/Maychell/orgs","repos_url":"https://api.github.com/users/Maychell/repos","events_url":"https://api.github.com/users/Maychell/events{/privacy}","received_events_url":"https://api.github.com/users/Maychell/received_events","type":"User","site_admin":false},"body":"Acho que você poderia mocar o resultado do `user.pending_documents?` para apenas os possíveis retornos (`true` e `false`). Isso porque a gente estaria testando o `pending_documents?` já no `user_spec`.\r\n\r\nVc poderia fazer algo do tipo:\r\n```Ruby\r\ncontext \"when there are pending documents\" do\r\n  before do\r\n    allow(user).to receive(:pending_documents?).and_return(true)\r\n  end\r\n\r\n  it { is_expected.to have_tag(...) }\r\nend\r\n\r\ncontext \"when there is no pending documents\" do\r\n  before do\r\n    allow(user).to receive(:pending_documents?).and_return(false)\r\n  end\r\n  \r\n  it { is_expected.to be_nil }\r\nend\r\n```","created_at":"2017-03-29T15:11:20Z","updated_at":"2017-03-29T15:12:18Z","html_url":"https://github.com/juntos-com-vc/juntos.com.vc/pull/368#discussion_r108703009","pull_request_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/368","_links":{"self":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/comments/108703009"},"html":{"href":"https://github.com/juntos-com-vc/juntos.com.vc/pull/368#discussion_r108703009"},"pull_request":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/368"}}},"pull_request":{"url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/368","id":113048812,"html_url":"https://github.com/juntos-com-vc/juntos.com.vc/pull/368","diff_url":"https://github.com/juntos-com-vc/juntos.com.vc/pull/368.diff","patch_url":"https://github.com/juntos-com-vc/juntos.com.vc/pull/368.patch","issue_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/368","number":368,"state":"open","locked":false,"title":"Adding a validation for the Legal Entity's authorization documents","user":{"login":"igorrfc","id":7783787,"avatar_url":"https://avatars2.githubusercontent.com/u/7783787?v=3","gravatar_id":"","url":"https://api.github.com/users/igorrfc","html_url":"https://github.com/igorrfc","followers_url":"https://api.github.com/users/igorrfc/followers","following_url":"https://api.github.com/users/igorrfc/following{/other_user}","gists_url":"https://api.github.com/users/igorrfc/gists{/gist_id}","starred_url":"https://api.github.com/users/igorrfc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorrfc/subscriptions","organizations_url":"https://api.github.com/users/igorrfc/orgs","repos_url":"https://api.github.com/users/igorrfc/repos","events_url":"https://api.github.com/users/igorrfc/events{/privacy}","received_events_url":"https://api.github.com/users/igorrfc/received_events","type":"User","site_admin":false},"body":"The `.pending_documents?` user's method now is checking if all the required documents were sent by the legal entity.","created_at":"2017-03-28T19:32:15Z","updated_at":"2017-03-29T15:12:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca4288d4883b0c5fd0f89aa0a359421e6b6a3d52","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/368/commits","review_comments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/368/comments","review_comment_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/368/comments","statuses_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/statuses/33dded90da29aa847cd235786dd3449b9b2a9b99","head":{"label":"juntos-com-vc:fix-authorization-documents-validation","ref":"fix-authorization-documents-validation","sha":"33dded90da29aa847cd235786dd3449b9b2a9b99","user":{"login":"juntos-com-vc","id":16776745,"avatar_url":"https://avatars0.githubusercontent.com/u/16776745?v=3","gravatar_id":"","url":"https://api.github.com/users/juntos-com-vc","html_url":"https://github.com/juntos-com-vc","followers_url":"https://api.github.com/users/juntos-com-vc/followers","following_url":"https://api.github.com/users/juntos-com-vc/following{/other_user}","gists_url":"https://api.github.com/users/juntos-com-vc/gists{/gist_id}","starred_url":"https://api.github.com/users/juntos-com-vc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juntos-com-vc/subscriptions","organizations_url":"https://api.github.com/users/juntos-com-vc/orgs","repos_url":"https://api.github.com/users/juntos-com-vc/repos","events_url":"https://api.github.com/users/juntos-com-vc/events{/privacy}","received_events_url":"https://api.github.com/users/juntos-com-vc/received_events","type":"Organization","site_admin":false},"repo":{"id":25652386,"name":"juntos.com.vc","full_name":"juntos-com-vc/juntos.com.vc","owner":{"login":"juntos-com-vc","id":16776745,"avatar_url":"https://avatars0.githubusercontent.com/u/16776745?v=3","gravatar_id":"","url":"https://api.github.com/users/juntos-com-vc","html_url":"https://github.com/juntos-com-vc","followers_url":"https://api.github.com/users/juntos-com-vc/followers","following_url":"https://api.github.com/users/juntos-com-vc/following{/other_user}","gists_url":"https://api.github.com/users/juntos-com-vc/gists{/gist_id}","starred_url":"https://api.github.com/users/juntos-com-vc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juntos-com-vc/subscriptions","organizations_url":"https://api.github.com/users/juntos-com-vc/orgs","repos_url":"https://api.github.com/users/juntos-com-vc/repos","events_url":"https://api.github.com/users/juntos-com-vc/events{/privacy}","received_events_url":"https://api.github.com/users/juntos-com-vc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juntos-com-vc/juntos.com.vc","description":null,"fork":false,"url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc","forks_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/forks","keys_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/teams","hooks_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/hooks","issue_events_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/events{/number}","events_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/events","assignees_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/assignees{/user}","branches_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/branches{/branch}","tags_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/tags","blobs_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/refs{/sha}","trees_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/statuses/{sha}","languages_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/languages","stargazers_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/stargazers","contributors_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/contributors","subscribers_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/subscribers","subscription_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/subscription","commits_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/commits{/sha}","git_commits_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/commits{/sha}","comments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/comments{/number}","issue_comment_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/comments{/number}","contents_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/contents/{+path}","compare_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/merges","archive_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/downloads","issues_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues{/number}","pulls_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls{/number}","milestones_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/milestones{/number}","notifications_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/labels{/name}","releases_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/releases{/id}","deployments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/deployments","created_at":"2014-10-23T18:43:07Z","updated_at":"2017-02-28T10:42:51Z","pushed_at":"2017-03-28T22:45:48Z","git_url":"git://github.com/juntos-com-vc/juntos.com.vc.git","ssh_url":"git@github.com:juntos-com-vc/juntos.com.vc.git","clone_url":"https://github.com/juntos-com-vc/juntos.com.vc.git","svn_url":"https://github.com/juntos-com-vc/juntos.com.vc","homepage":null,"size":51378,"stargazers_count":10,"watchers_count":10,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":10,"default_branch":"master"}},"base":{"label":"juntos-com-vc:master","ref":"master","sha":"e7ab08173a8c90be24c7ec1c0ee101bef9df504a","user":{"login":"juntos-com-vc","id":16776745,"avatar_url":"https://avatars0.githubusercontent.com/u/16776745?v=3","gravatar_id":"","url":"https://api.github.com/users/juntos-com-vc","html_url":"https://github.com/juntos-com-vc","followers_url":"https://api.github.com/users/juntos-com-vc/followers","following_url":"https://api.github.com/users/juntos-com-vc/following{/other_user}","gists_url":"https://api.github.com/users/juntos-com-vc/gists{/gist_id}","starred_url":"https://api.github.com/users/juntos-com-vc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juntos-com-vc/subscriptions","organizations_url":"https://api.github.com/users/juntos-com-vc/orgs","repos_url":"https://api.github.com/users/juntos-com-vc/repos","events_url":"https://api.github.com/users/juntos-com-vc/events{/privacy}","received_events_url":"https://api.github.com/users/juntos-com-vc/received_events","type":"Organization","site_admin":false},"repo":{"id":25652386,"name":"juntos.com.vc","full_name":"juntos-com-vc/juntos.com.vc","owner":{"login":"juntos-com-vc","id":16776745,"avatar_url":"https://avatars0.githubusercontent.com/u/16776745?v=3","gravatar_id":"","url":"https://api.github.com/users/juntos-com-vc","html_url":"https://github.com/juntos-com-vc","followers_url":"https://api.github.com/users/juntos-com-vc/followers","following_url":"https://api.github.com/users/juntos-com-vc/following{/other_user}","gists_url":"https://api.github.com/users/juntos-com-vc/gists{/gist_id}","starred_url":"https://api.github.com/users/juntos-com-vc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juntos-com-vc/subscriptions","organizations_url":"https://api.github.com/users/juntos-com-vc/orgs","repos_url":"https://api.github.com/users/juntos-com-vc/repos","events_url":"https://api.github.com/users/juntos-com-vc/events{/privacy}","received_events_url":"https://api.github.com/users/juntos-com-vc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juntos-com-vc/juntos.com.vc","description":null,"fork":false,"url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc","forks_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/forks","keys_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/teams","hooks_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/hooks","issue_events_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/events{/number}","events_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/events","assignees_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/assignees{/user}","branches_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/branches{/branch}","tags_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/tags","blobs_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/refs{/sha}","trees_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/statuses/{sha}","languages_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/languages","stargazers_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/stargazers","contributors_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/contributors","subscribers_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/subscribers","subscription_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/subscription","commits_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/commits{/sha}","git_commits_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/commits{/sha}","comments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/comments{/number}","issue_comment_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/comments{/number}","contents_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/contents/{+path}","compare_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/merges","archive_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/downloads","issues_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues{/number}","pulls_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls{/number}","milestones_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/milestones{/number}","notifications_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/labels{/name}","releases_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/releases{/id}","deployments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/deployments","created_at":"2014-10-23T18:43:07Z","updated_at":"2017-02-28T10:42:51Z","pushed_at":"2017-03-28T22:45:48Z","git_url":"git://github.com/juntos-com-vc/juntos.com.vc.git","ssh_url":"git@github.com:juntos-com-vc/juntos.com.vc.git","clone_url":"https://github.com/juntos-com-vc/juntos.com.vc.git","svn_url":"https://github.com/juntos-com-vc/juntos.com.vc","homepage":null,"size":51378,"stargazers_count":10,"watchers_count":10,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/368"},"html":{"href":"https://github.com/juntos-com-vc/juntos.com.vc/pull/368"},"issue":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/368"},"comments":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/368/comments"},"review_comments":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/368/comments"},"review_comment":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/368/commits"},"statuses":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/statuses/33dded90da29aa847cd235786dd3449b9b2a9b99"}}}}
{"actor":{"display_login":"Maychell"}}