{"action":"created","comment":{"url":"https://api.github.com/repos/tegnike/rails_app/pulls/comments/310441414","pull_request_review_id":270561433,"id":310441414,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMxMDQ0MTQxNA==","diff_hunk":"@@ -0,0 +1,79 @@\n+require 'rails_helper'\n+\n+RSpec.describe \"UsersEditTest\", type: :request do\n+  describe \"ユーザー編集をテストする\" do\n+    let!(:user) { create(:user, name: \"Example\", email: \"user@example.com\") }\n+    context \"無効な情報で編集を試みた場合\" do\n+      before {\n+        log_in_as(user)\n+        get edit_user_path(user)\n+        put user_path(user), params: { user: { name:  \"\",\n+                                                  email: \"foo@invalid\",\n+                                                  password:              \"foo\",\n+                                                  password_confirmation: \"bar\" } }\n+      }\n+      it \"edit_user_pathにレンダーされること\" do\n+        expect(response).to render_template 'users/edit'\n+      end\n+      it \"フラッシュメッセージが表示されること\" do\n+        expect(response.body).to include 'alert-danger'\n+      end\n+    end\n+\n+    context \"有効な情報で編集を試みた場合\" do\n+      before {\n+        log_in_as(user)\n+        get edit_user_path(user)\n+        put user_path(user), params: { user: { name:  \"Example2\",\n+                                                  email: \"user2@example.com\",\n+                                                  password:              \"\",\n+                                                  password_confirmation: \"\" } }\n+      }\n+      it \"user_pathにリダイレクトされること\" do\n+        expect(response).to redirect_to user_path(user)\n+      end\n+      it \"ユーザ名が更新されること\" do\n+        user.reload\n+        expect(user.name).to eq('Example2')","path":"spec/requests/users_edit_spec.rb","position":37,"original_position":37,"commit_id":"311393016b5dfe87449e074ae0be7958e051cb81","original_commit_id":"311393016b5dfe87449e074ae0be7958e051cb81","user":{"login":"belion-freee","id":34331230,"node_id":"MDQ6VXNlcjM0MzMxMjMw","avatar_url":"https://avatars1.githubusercontent.com/u/34331230?v=4","gravatar_id":"","url":"https://api.github.com/users/belion-freee","html_url":"https://github.com/belion-freee","followers_url":"https://api.github.com/users/belion-freee/followers","following_url":"https://api.github.com/users/belion-freee/following{/other_user}","gists_url":"https://api.github.com/users/belion-freee/gists{/gist_id}","starred_url":"https://api.github.com/users/belion-freee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belion-freee/subscriptions","organizations_url":"https://api.github.com/users/belion-freee/orgs","repos_url":"https://api.github.com/users/belion-freee/repos","events_url":"https://api.github.com/users/belion-freee/events{/privacy}","received_events_url":"https://api.github.com/users/belion-freee/received_events","type":"User","site_admin":false},"body":"[ASK]\r\n最初のテストでbeforeで更新されてるので、PUTリクエストする前から`Example2`になってないでしょうか？","created_at":"2019-08-05T05:22:14Z","updated_at":"2019-08-05T05:25:20Z","html_url":"https://github.com/tegnike/rails_app/pull/21#discussion_r310441414","pull_request_url":"https://api.github.com/repos/tegnike/rails_app/pulls/21","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/tegnike/rails_app/pulls/comments/310441414"},"html":{"href":"https://github.com/tegnike/rails_app/pull/21#discussion_r310441414"},"pull_request":{"href":"https://api.github.com/repos/tegnike/rails_app/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/tegnike/rails_app/pulls/21","id":304090238,"node_id":"MDExOlB1bGxSZXF1ZXN0MzA0MDkwMjM4","html_url":"https://github.com/tegnike/rails_app/pull/21","diff_url":"https://github.com/tegnike/rails_app/pull/21.diff","patch_url":"https://github.com/tegnike/rails_app/pull/21.patch","issue_url":"https://api.github.com/repos/tegnike/rails_app/issues/21","number":21,"state":"open","locked":false,"title":"10th updating users","user":{"login":"tegnike","id":35606144,"node_id":"MDQ6VXNlcjM1NjA2MTQ0","avatar_url":"https://avatars0.githubusercontent.com/u/35606144?v=4","gravatar_id":"","url":"https://api.github.com/users/tegnike","html_url":"https://github.com/tegnike","followers_url":"https://api.github.com/users/tegnike/followers","following_url":"https://api.github.com/users/tegnike/following{/other_user}","gists_url":"https://api.github.com/users/tegnike/gists{/gist_id}","starred_url":"https://api.github.com/users/tegnike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tegnike/subscriptions","organizations_url":"https://api.github.com/users/tegnike/orgs","repos_url":"https://api.github.com/users/tegnike/repos","events_url":"https://api.github.com/users/tegnike/events{/privacy}","received_events_url":"https://api.github.com/users/tegnike/received_events","type":"User","site_admin":false},"body":"第10章が終了いたしました。\r\n今回もspecフォルダ以下の確認をお願いいたします。\r\n\r\nせっかく作ったのでsystem specでテスト作成したかったのですが、ログイン処理などが必要な関係でほとんどrequest specで書いています。","created_at":"2019-08-04T19:38:09Z","updated_at":"2019-08-05T05:25:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ed49171f9c6b9ef575033847eded032a68a0242","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tegnike/rails_app/pulls/21/commits","review_comments_url":"https://api.github.com/repos/tegnike/rails_app/pulls/21/comments","review_comment_url":"https://api.github.com/repos/tegnike/rails_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tegnike/rails_app/issues/21/comments","statuses_url":"https://api.github.com/repos/tegnike/rails_app/statuses/311393016b5dfe87449e074ae0be7958e051cb81","head":{"label":"tegnike:10th_updating_users","ref":"10th_updating_users","sha":"311393016b5dfe87449e074ae0be7958e051cb81","user":{"login":"tegnike","id":35606144,"node_id":"MDQ6VXNlcjM1NjA2MTQ0","avatar_url":"https://avatars0.githubusercontent.com/u/35606144?v=4","gravatar_id":"","url":"https://api.github.com/users/tegnike","html_url":"https://github.com/tegnike","followers_url":"https://api.github.com/users/tegnike/followers","following_url":"https://api.github.com/users/tegnike/following{/other_user}","gists_url":"https://api.github.com/users/tegnike/gists{/gist_id}","starred_url":"https://api.github.com/users/tegnike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tegnike/subscriptions","organizations_url":"https://api.github.com/users/tegnike/orgs","repos_url":"https://api.github.com/users/tegnike/repos","events_url":"https://api.github.com/users/tegnike/events{/privacy}","received_events_url":"https://api.github.com/users/tegnike/received_events","type":"User","site_admin":false},"repo":{"id":198466999,"node_id":"MDEwOlJlcG9zaXRvcnkxOTg0NjY5OTk=","name":"rails_app","full_name":"tegnike/rails_app","private":false,"owner":{"login":"tegnike","id":35606144,"node_id":"MDQ6VXNlcjM1NjA2MTQ0","avatar_url":"https://avatars0.githubusercontent.com/u/35606144?v=4","gravatar_id":"","url":"https://api.github.com/users/tegnike","html_url":"https://github.com/tegnike","followers_url":"https://api.github.com/users/tegnike/followers","following_url":"https://api.github.com/users/tegnike/following{/other_user}","gists_url":"https://api.github.com/users/tegnike/gists{/gist_id}","starred_url":"https://api.github.com/users/tegnike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tegnike/subscriptions","organizations_url":"https://api.github.com/users/tegnike/orgs","repos_url":"https://api.github.com/users/tegnike/repos","events_url":"https://api.github.com/users/tegnike/events{/privacy}","received_events_url":"https://api.github.com/users/tegnike/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tegnike/rails_app","description":null,"fork":false,"url":"https://api.github.com/repos/tegnike/rails_app","forks_url":"https://api.github.com/repos/tegnike/rails_app/forks","keys_url":"https://api.github.com/repos/tegnike/rails_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tegnike/rails_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tegnike/rails_app/teams","hooks_url":"https://api.github.com/repos/tegnike/rails_app/hooks","issue_events_url":"https://api.github.com/repos/tegnike/rails_app/issues/events{/number}","events_url":"https://api.github.com/repos/tegnike/rails_app/events","assignees_url":"https://api.github.com/repos/tegnike/rails_app/assignees{/user}","branches_url":"https://api.github.com/repos/tegnike/rails_app/branches{/branch}","tags_url":"https://api.github.com/repos/tegnike/rails_app/tags","blobs_url":"https://api.github.com/repos/tegnike/rails_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tegnike/rails_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tegnike/rails_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/tegnike/rails_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tegnike/rails_app/statuses/{sha}","languages_url":"https://api.github.com/repos/tegnike/rails_app/languages","stargazers_url":"https://api.github.com/repos/tegnike/rails_app/stargazers","contributors_url":"https://api.github.com/repos/tegnike/rails_app/contributors","subscribers_url":"https://api.github.com/repos/tegnike/rails_app/subscribers","subscription_url":"https://api.github.com/repos/tegnike/rails_app/subscription","commits_url":"https://api.github.com/repos/tegnike/rails_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/tegnike/rails_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/tegnike/rails_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/tegnike/rails_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/tegnike/rails_app/contents/{+path}","compare_url":"https://api.github.com/repos/tegnike/rails_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tegnike/rails_app/merges","archive_url":"https://api.github.com/repos/tegnike/rails_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tegnike/rails_app/downloads","issues_url":"https://api.github.com/repos/tegnike/rails_app/issues{/number}","pulls_url":"https://api.github.com/repos/tegnike/rails_app/pulls{/number}","milestones_url":"https://api.github.com/repos/tegnike/rails_app/milestones{/number}","notifications_url":"https://api.github.com/repos/tegnike/rails_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tegnike/rails_app/labels{/name}","releases_url":"https://api.github.com/repos/tegnike/rails_app/releases{/id}","deployments_url":"https://api.github.com/repos/tegnike/rails_app/deployments","created_at":"2019-07-23T16:18:38Z","updated_at":"2019-08-02T09:44:12Z","pushed_at":"2019-08-05T05:06:34Z","git_url":"git://github.com/tegnike/rails_app.git","ssh_url":"git@github.com:tegnike/rails_app.git","clone_url":"https://github.com/tegnike/rails_app.git","svn_url":"https://github.com/tegnike/rails_app","homepage":null,"size":219,"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,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"tegnike:master","ref":"master","sha":"6d7fe48cb7ba745dd790d2ce2725960b813151d6","user":{"login":"tegnike","id":35606144,"node_id":"MDQ6VXNlcjM1NjA2MTQ0","avatar_url":"https://avatars0.githubusercontent.com/u/35606144?v=4","gravatar_id":"","url":"https://api.github.com/users/tegnike","html_url":"https://github.com/tegnike","followers_url":"https://api.github.com/users/tegnike/followers","following_url":"https://api.github.com/users/tegnike/following{/other_user}","gists_url":"https://api.github.com/users/tegnike/gists{/gist_id}","starred_url":"https://api.github.com/users/tegnike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tegnike/subscriptions","organizations_url":"https://api.github.com/users/tegnike/orgs","repos_url":"https://api.github.com/users/tegnike/repos","events_url":"https://api.github.com/users/tegnike/events{/privacy}","received_events_url":"https://api.github.com/users/tegnike/received_events","type":"User","site_admin":false},"repo":{"id":198466999,"node_id":"MDEwOlJlcG9zaXRvcnkxOTg0NjY5OTk=","name":"rails_app","full_name":"tegnike/rails_app","private":false,"owner":{"login":"tegnike","id":35606144,"node_id":"MDQ6VXNlcjM1NjA2MTQ0","avatar_url":"https://avatars0.githubusercontent.com/u/35606144?v=4","gravatar_id":"","url":"https://api.github.com/users/tegnike","html_url":"https://github.com/tegnike","followers_url":"https://api.github.com/users/tegnike/followers","following_url":"https://api.github.com/users/tegnike/following{/other_user}","gists_url":"https://api.github.com/users/tegnike/gists{/gist_id}","starred_url":"https://api.github.com/users/tegnike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tegnike/subscriptions","organizations_url":"https://api.github.com/users/tegnike/orgs","repos_url":"https://api.github.com/users/tegnike/repos","events_url":"https://api.github.com/users/tegnike/events{/privacy}","received_events_url":"https://api.github.com/users/tegnike/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tegnike/rails_app","description":null,"fork":false,"url":"https://api.github.com/repos/tegnike/rails_app","forks_url":"https://api.github.com/repos/tegnike/rails_app/forks","keys_url":"https://api.github.com/repos/tegnike/rails_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tegnike/rails_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tegnike/rails_app/teams","hooks_url":"https://api.github.com/repos/tegnike/rails_app/hooks","issue_events_url":"https://api.github.com/repos/tegnike/rails_app/issues/events{/number}","events_url":"https://api.github.com/repos/tegnike/rails_app/events","assignees_url":"https://api.github.com/repos/tegnike/rails_app/assignees{/user}","branches_url":"https://api.github.com/repos/tegnike/rails_app/branches{/branch}","tags_url":"https://api.github.com/repos/tegnike/rails_app/tags","blobs_url":"https://api.github.com/repos/tegnike/rails_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tegnike/rails_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tegnike/rails_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/tegnike/rails_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tegnike/rails_app/statuses/{sha}","languages_url":"https://api.github.com/repos/tegnike/rails_app/languages","stargazers_url":"https://api.github.com/repos/tegnike/rails_app/stargazers","contributors_url":"https://api.github.com/repos/tegnike/rails_app/contributors","subscribers_url":"https://api.github.com/repos/tegnike/rails_app/subscribers","subscription_url":"https://api.github.com/repos/tegnike/rails_app/subscription","commits_url":"https://api.github.com/repos/tegnike/rails_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/tegnike/rails_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/tegnike/rails_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/tegnike/rails_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/tegnike/rails_app/contents/{+path}","compare_url":"https://api.github.com/repos/tegnike/rails_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tegnike/rails_app/merges","archive_url":"https://api.github.com/repos/tegnike/rails_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tegnike/rails_app/downloads","issues_url":"https://api.github.com/repos/tegnike/rails_app/issues{/number}","pulls_url":"https://api.github.com/repos/tegnike/rails_app/pulls{/number}","milestones_url":"https://api.github.com/repos/tegnike/rails_app/milestones{/number}","notifications_url":"https://api.github.com/repos/tegnike/rails_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tegnike/rails_app/labels{/name}","releases_url":"https://api.github.com/repos/tegnike/rails_app/releases{/id}","deployments_url":"https://api.github.com/repos/tegnike/rails_app/deployments","created_at":"2019-07-23T16:18:38Z","updated_at":"2019-08-02T09:44:12Z","pushed_at":"2019-08-05T05:06:34Z","git_url":"git://github.com/tegnike/rails_app.git","ssh_url":"git@github.com:tegnike/rails_app.git","clone_url":"https://github.com/tegnike/rails_app.git","svn_url":"https://github.com/tegnike/rails_app","homepage":null,"size":219,"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,"disabled":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/tegnike/rails_app/pulls/21"},"html":{"href":"https://github.com/tegnike/rails_app/pull/21"},"issue":{"href":"https://api.github.com/repos/tegnike/rails_app/issues/21"},"comments":{"href":"https://api.github.com/repos/tegnike/rails_app/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/tegnike/rails_app/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/tegnike/rails_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tegnike/rails_app/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/tegnike/rails_app/statuses/311393016b5dfe87449e074ae0be7958e051cb81"}},"author_association":"OWNER"}}
{"actor":{"display_login":"belion-freee"}}