{"action":"created","comment":{"url":"https://api.github.com/repos/nekoze1210/protospace/pulls/comments/70362466","id":70362466,"diff_hunk":"@@ -0,0 +1,72 @@\n+require 'rails_helper'\n+\n+describe Prototype do\n+  describe 'associations' do\n+\n+    describe 'with user' do\n+      it 'is associated with an user' do\n+        user = create(:user)\n+        proto = create(:prototype, user: user)\n+        expect(proto.user).to eq user\n+      end\n+    end\n+\n+    describe 'with comments' do\n+      it 'deletes the comments when Prototype is deleted' do\n+        proto = create(:prototype)\n+        comment = create(:comment, prototype: proto)\n+        expect { proto.destroy }.to change{ Comment.count }.by(-1)\n+      end\n+    end\n+\n+    describe 'with likes' do\n+      it 'deletes the likes when Prototype is deleted' do\n+        proto = create(:prototype)","path":"spec/models/prototype_spec.rb","position":24,"original_position":24,"commit_id":"b592e15d458fe3d6b4e14c811496c2a763ddb7b8","original_commit_id":"b592e15d458fe3d6b4e14c811496c2a763ddb7b8","user":{"login":"kenchan0503","id":15911121,"avatar_url":"https://avatars.githubusercontent.com/u/15911121?v=3","gravatar_id":"","url":"https://api.github.com/users/kenchan0503","html_url":"https://github.com/kenchan0503","followers_url":"https://api.github.com/users/kenchan0503/followers","following_url":"https://api.github.com/users/kenchan0503/following{/other_user}","gists_url":"https://api.github.com/users/kenchan0503/gists{/gist_id}","starred_url":"https://api.github.com/users/kenchan0503/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenchan0503/subscriptions","organizations_url":"https://api.github.com/users/kenchan0503/orgs","repos_url":"https://api.github.com/users/kenchan0503/repos","events_url":"https://api.github.com/users/kenchan0503/events{/privacy}","received_events_url":"https://api.github.com/users/kenchan0503/received_events","type":"User","site_admin":false},"body":"この辺のprotoとかもlet使えそう。","created_at":"2016-07-12T00:47:45Z","updated_at":"2016-07-12T00:47:45Z","html_url":"https://github.com/nekoze1210/protospace/pull/21#discussion_r70362466","pull_request_url":"https://api.github.com/repos/nekoze1210/protospace/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/nekoze1210/protospace/pulls/comments/70362466"},"html":{"href":"https://github.com/nekoze1210/protospace/pull/21#discussion_r70362466"},"pull_request":{"href":"https://api.github.com/repos/nekoze1210/protospace/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/nekoze1210/protospace/pulls/21","id":76861136,"html_url":"https://github.com/nekoze1210/protospace/pull/21","diff_url":"https://github.com/nekoze1210/protospace/pull/21.diff","patch_url":"https://github.com/nekoze1210/protospace/pull/21.patch","issue_url":"https://api.github.com/repos/nekoze1210/protospace/issues/21","number":21,"state":"open","locked":false,"title":"Test image and prototype model","user":{"login":"nekoze1210","id":14988862,"avatar_url":"https://avatars.githubusercontent.com/u/14988862?v=3","gravatar_id":"","url":"https://api.github.com/users/nekoze1210","html_url":"https://github.com/nekoze1210","followers_url":"https://api.github.com/users/nekoze1210/followers","following_url":"https://api.github.com/users/nekoze1210/following{/other_user}","gists_url":"https://api.github.com/users/nekoze1210/gists{/gist_id}","starred_url":"https://api.github.com/users/nekoze1210/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekoze1210/subscriptions","organizations_url":"https://api.github.com/users/nekoze1210/orgs","repos_url":"https://api.github.com/users/nekoze1210/repos","events_url":"https://api.github.com/users/nekoze1210/events{/privacy}","received_events_url":"https://api.github.com/users/nekoze1210/received_events","type":"User","site_admin":false},"body":"## WHAT \r\n- Prototypeモデル、protoimageモデルのテスト\r\n- 各アソシエーションのテスト(comment, like)\r\n\r\n## WHY\r\n- デプロイ時に不具合を発生させないため\r\n- 動作確認","created_at":"2016-07-10T00:59:00Z","updated_at":"2016-07-12T00:47:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c941131282bf5789fd0c5e8a92876fbedcb13dcc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nekoze1210/protospace/pulls/21/commits","review_comments_url":"https://api.github.com/repos/nekoze1210/protospace/pulls/21/comments","review_comment_url":"https://api.github.com/repos/nekoze1210/protospace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nekoze1210/protospace/issues/21/comments","statuses_url":"https://api.github.com/repos/nekoze1210/protospace/statuses/b592e15d458fe3d6b4e14c811496c2a763ddb7b8","head":{"label":"nekoze1210:Test-image_and_prototype_model","ref":"Test-image_and_prototype_model","sha":"b592e15d458fe3d6b4e14c811496c2a763ddb7b8","user":{"login":"nekoze1210","id":14988862,"avatar_url":"https://avatars.githubusercontent.com/u/14988862?v=3","gravatar_id":"","url":"https://api.github.com/users/nekoze1210","html_url":"https://github.com/nekoze1210","followers_url":"https://api.github.com/users/nekoze1210/followers","following_url":"https://api.github.com/users/nekoze1210/following{/other_user}","gists_url":"https://api.github.com/users/nekoze1210/gists{/gist_id}","starred_url":"https://api.github.com/users/nekoze1210/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekoze1210/subscriptions","organizations_url":"https://api.github.com/users/nekoze1210/orgs","repos_url":"https://api.github.com/users/nekoze1210/repos","events_url":"https://api.github.com/users/nekoze1210/events{/privacy}","received_events_url":"https://api.github.com/users/nekoze1210/received_events","type":"User","site_admin":false},"repo":{"id":58253324,"name":"protospace","full_name":"nekoze1210/protospace","owner":{"login":"nekoze1210","id":14988862,"avatar_url":"https://avatars.githubusercontent.com/u/14988862?v=3","gravatar_id":"","url":"https://api.github.com/users/nekoze1210","html_url":"https://github.com/nekoze1210","followers_url":"https://api.github.com/users/nekoze1210/followers","following_url":"https://api.github.com/users/nekoze1210/following{/other_user}","gists_url":"https://api.github.com/users/nekoze1210/gists{/gist_id}","starred_url":"https://api.github.com/users/nekoze1210/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekoze1210/subscriptions","organizations_url":"https://api.github.com/users/nekoze1210/orgs","repos_url":"https://api.github.com/users/nekoze1210/repos","events_url":"https://api.github.com/users/nekoze1210/events{/privacy}","received_events_url":"https://api.github.com/users/nekoze1210/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nekoze1210/protospace","description":"","fork":false,"url":"https://api.github.com/repos/nekoze1210/protospace","forks_url":"https://api.github.com/repos/nekoze1210/protospace/forks","keys_url":"https://api.github.com/repos/nekoze1210/protospace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nekoze1210/protospace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nekoze1210/protospace/teams","hooks_url":"https://api.github.com/repos/nekoze1210/protospace/hooks","issue_events_url":"https://api.github.com/repos/nekoze1210/protospace/issues/events{/number}","events_url":"https://api.github.com/repos/nekoze1210/protospace/events","assignees_url":"https://api.github.com/repos/nekoze1210/protospace/assignees{/user}","branches_url":"https://api.github.com/repos/nekoze1210/protospace/branches{/branch}","tags_url":"https://api.github.com/repos/nekoze1210/protospace/tags","blobs_url":"https://api.github.com/repos/nekoze1210/protospace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nekoze1210/protospace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nekoze1210/protospace/git/refs{/sha}","trees_url":"https://api.github.com/repos/nekoze1210/protospace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nekoze1210/protospace/statuses/{sha}","languages_url":"https://api.github.com/repos/nekoze1210/protospace/languages","stargazers_url":"https://api.github.com/repos/nekoze1210/protospace/stargazers","contributors_url":"https://api.github.com/repos/nekoze1210/protospace/contributors","subscribers_url":"https://api.github.com/repos/nekoze1210/protospace/subscribers","subscription_url":"https://api.github.com/repos/nekoze1210/protospace/subscription","commits_url":"https://api.github.com/repos/nekoze1210/protospace/commits{/sha}","git_commits_url":"https://api.github.com/repos/nekoze1210/protospace/git/commits{/sha}","comments_url":"https://api.github.com/repos/nekoze1210/protospace/comments{/number}","issue_comment_url":"https://api.github.com/repos/nekoze1210/protospace/issues/comments{/number}","contents_url":"https://api.github.com/repos/nekoze1210/protospace/contents/{+path}","compare_url":"https://api.github.com/repos/nekoze1210/protospace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nekoze1210/protospace/merges","archive_url":"https://api.github.com/repos/nekoze1210/protospace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nekoze1210/protospace/downloads","issues_url":"https://api.github.com/repos/nekoze1210/protospace/issues{/number}","pulls_url":"https://api.github.com/repos/nekoze1210/protospace/pulls{/number}","milestones_url":"https://api.github.com/repos/nekoze1210/protospace/milestones{/number}","notifications_url":"https://api.github.com/repos/nekoze1210/protospace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nekoze1210/protospace/labels{/name}","releases_url":"https://api.github.com/repos/nekoze1210/protospace/releases{/id}","deployments_url":"https://api.github.com/repos/nekoze1210/protospace/deployments","created_at":"2016-05-07T06:42:13Z","updated_at":"2016-05-12T13:56:59Z","pushed_at":"2016-07-10T03:36:22Z","git_url":"git://github.com/nekoze1210/protospace.git","ssh_url":"git@github.com:nekoze1210/protospace.git","clone_url":"https://github.com/nekoze1210/protospace.git","svn_url":"https://github.com/nekoze1210/protospace","homepage":"","size":632,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"nekoze1210:master","ref":"master","sha":"1ae38e30cb8c5af0d504e44b686b0c7cd9744cba","user":{"login":"nekoze1210","id":14988862,"avatar_url":"https://avatars.githubusercontent.com/u/14988862?v=3","gravatar_id":"","url":"https://api.github.com/users/nekoze1210","html_url":"https://github.com/nekoze1210","followers_url":"https://api.github.com/users/nekoze1210/followers","following_url":"https://api.github.com/users/nekoze1210/following{/other_user}","gists_url":"https://api.github.com/users/nekoze1210/gists{/gist_id}","starred_url":"https://api.github.com/users/nekoze1210/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekoze1210/subscriptions","organizations_url":"https://api.github.com/users/nekoze1210/orgs","repos_url":"https://api.github.com/users/nekoze1210/repos","events_url":"https://api.github.com/users/nekoze1210/events{/privacy}","received_events_url":"https://api.github.com/users/nekoze1210/received_events","type":"User","site_admin":false},"repo":{"id":58253324,"name":"protospace","full_name":"nekoze1210/protospace","owner":{"login":"nekoze1210","id":14988862,"avatar_url":"https://avatars.githubusercontent.com/u/14988862?v=3","gravatar_id":"","url":"https://api.github.com/users/nekoze1210","html_url":"https://github.com/nekoze1210","followers_url":"https://api.github.com/users/nekoze1210/followers","following_url":"https://api.github.com/users/nekoze1210/following{/other_user}","gists_url":"https://api.github.com/users/nekoze1210/gists{/gist_id}","starred_url":"https://api.github.com/users/nekoze1210/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekoze1210/subscriptions","organizations_url":"https://api.github.com/users/nekoze1210/orgs","repos_url":"https://api.github.com/users/nekoze1210/repos","events_url":"https://api.github.com/users/nekoze1210/events{/privacy}","received_events_url":"https://api.github.com/users/nekoze1210/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nekoze1210/protospace","description":"","fork":false,"url":"https://api.github.com/repos/nekoze1210/protospace","forks_url":"https://api.github.com/repos/nekoze1210/protospace/forks","keys_url":"https://api.github.com/repos/nekoze1210/protospace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nekoze1210/protospace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nekoze1210/protospace/teams","hooks_url":"https://api.github.com/repos/nekoze1210/protospace/hooks","issue_events_url":"https://api.github.com/repos/nekoze1210/protospace/issues/events{/number}","events_url":"https://api.github.com/repos/nekoze1210/protospace/events","assignees_url":"https://api.github.com/repos/nekoze1210/protospace/assignees{/user}","branches_url":"https://api.github.com/repos/nekoze1210/protospace/branches{/branch}","tags_url":"https://api.github.com/repos/nekoze1210/protospace/tags","blobs_url":"https://api.github.com/repos/nekoze1210/protospace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nekoze1210/protospace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nekoze1210/protospace/git/refs{/sha}","trees_url":"https://api.github.com/repos/nekoze1210/protospace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nekoze1210/protospace/statuses/{sha}","languages_url":"https://api.github.com/repos/nekoze1210/protospace/languages","stargazers_url":"https://api.github.com/repos/nekoze1210/protospace/stargazers","contributors_url":"https://api.github.com/repos/nekoze1210/protospace/contributors","subscribers_url":"https://api.github.com/repos/nekoze1210/protospace/subscribers","subscription_url":"https://api.github.com/repos/nekoze1210/protospace/subscription","commits_url":"https://api.github.com/repos/nekoze1210/protospace/commits{/sha}","git_commits_url":"https://api.github.com/repos/nekoze1210/protospace/git/commits{/sha}","comments_url":"https://api.github.com/repos/nekoze1210/protospace/comments{/number}","issue_comment_url":"https://api.github.com/repos/nekoze1210/protospace/issues/comments{/number}","contents_url":"https://api.github.com/repos/nekoze1210/protospace/contents/{+path}","compare_url":"https://api.github.com/repos/nekoze1210/protospace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nekoze1210/protospace/merges","archive_url":"https://api.github.com/repos/nekoze1210/protospace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nekoze1210/protospace/downloads","issues_url":"https://api.github.com/repos/nekoze1210/protospace/issues{/number}","pulls_url":"https://api.github.com/repos/nekoze1210/protospace/pulls{/number}","milestones_url":"https://api.github.com/repos/nekoze1210/protospace/milestones{/number}","notifications_url":"https://api.github.com/repos/nekoze1210/protospace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nekoze1210/protospace/labels{/name}","releases_url":"https://api.github.com/repos/nekoze1210/protospace/releases{/id}","deployments_url":"https://api.github.com/repos/nekoze1210/protospace/deployments","created_at":"2016-05-07T06:42:13Z","updated_at":"2016-05-12T13:56:59Z","pushed_at":"2016-07-10T03:36:22Z","git_url":"git://github.com/nekoze1210/protospace.git","ssh_url":"git@github.com:nekoze1210/protospace.git","clone_url":"https://github.com/nekoze1210/protospace.git","svn_url":"https://github.com/nekoze1210/protospace","homepage":"","size":632,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nekoze1210/protospace/pulls/21"},"html":{"href":"https://github.com/nekoze1210/protospace/pull/21"},"issue":{"href":"https://api.github.com/repos/nekoze1210/protospace/issues/21"},"comments":{"href":"https://api.github.com/repos/nekoze1210/protospace/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/nekoze1210/protospace/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/nekoze1210/protospace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nekoze1210/protospace/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/nekoze1210/protospace/statuses/b592e15d458fe3d6b4e14c811496c2a763ddb7b8"}}}}
{"actor":{"display_login":"kenchan0503"}}