GitHub PullRequestReviewCommentEvent at 2014-12-23 15:05:08
Repository: activitystreams
Actor: lsvx
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/natgeo/activitystreams/pulls/comments/22218013","id":22218013,"diff_hunk":"@@ -49,12 +48,35 @@ describe('Test Activity Controller  ', function () {\n                     server.close(done);\n                 });\n             });\n+        });\n \n+        it('should reject post activity with a wrong verb', function (done) {\n+            server = testUtils.fakeServer({code:420, respond:{}});\n+            var postBody = JSON.parse(testUtils.createTestJSON());\n+            postBody.verb.type = \"WRONG\";\n+            var requestOptions = testUtils.createRequestOptions('POST', '/api/v1/activity', JSON.stringify(postBody));\n+            server.on(\"listening\", function() {\n+                testUtils.makeRequest(requestOptions, function (res) {\n+                    assert.equal(res.statusCode, 420);\n+                    server.close(done);\n+                });\n+            });\n         });\n \n+       it('should reject post activity with an actor id different from the user id registered', function (done) {\n+            server = testUtils.fakeServer({code:401, respond:{userId: 12}});","path":"tests/activityController.js","position":28,"original_position":28,"commit_id":"35c1b1d3dee762e2ef18c23b355754ad35af3d0d","original_commit_id":"35c1b1d3dee762e2ef18c23b355754ad35af3d0d","user":{"login":"lsvx","id":1369275,"avatar_url":"https://avatars.githubusercontent.com/u/1369275?v=3","gravatar_id":"","url":"https://api.github.com/users/lsvx","html_url":"https://github.com/lsvx","followers_url":"https://api.github.com/users/lsvx/followers","following_url":"https://api.github.com/users/lsvx/following{/other_user}","gists_url":"https://api.github.com/users/lsvx/gists{/gist_id}","starred_url":"https://api.github.com/users/lsvx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsvx/subscriptions","organizations_url":"https://api.github.com/users/lsvx/orgs","repos_url":"https://api.github.com/users/lsvx/repos","events_url":"https://api.github.com/users/lsvx/events{/privacy}","received_events_url":"https://api.github.com/users/lsvx/received_events","type":"User","site_admin":false},"body":"Ok, I see; in that case the test is wrong but for a different reason. If I hit an authentication endpoint and it responds with proper JSON about a user (even if it is not the user I want), what is the status code? It should be 200, not 420.","created_at":"2014-12-23T15:05:08Z","updated_at":"2014-12-23T15:05:08Z","html_url":"https://github.com/natgeo/activitystreams/pull/52#discussion_r22218013","pull_request_url":"https://api.github.com/repos/natgeo/activitystreams/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/natgeo/activitystreams/pulls/comments/22218013"},"html":{"href":"https://github.com/natgeo/activitystreams/pull/52#discussion_r22218013"},"pull_request":{"href":"https://api.github.com/repos/natgeo/activitystreams/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/natgeo/activitystreams/pulls/52","id":26371555,"html_url":"https://github.com/natgeo/activitystreams/pull/52","diff_url":"https://github.com/natgeo/activitystreams/pull/52.diff","patch_url":"https://github.com/natgeo/activitystreams/pull/52.patch","issue_url":"https://api.github.com/repos/natgeo/activitystreams/issues/52","number":52,"state":"open","locked":false,"title":"[MIE-1633] Validate create activities only for the current user","user":{"login":"dughetti","id":4237664,"avatar_url":"https://avatars.githubusercontent.com/u/4237664?v=3","gravatar_id":"","url":"https://api.github.com/users/dughetti","html_url":"https://github.com/dughetti","followers_url":"https://api.github.com/users/dughetti/followers","following_url":"https://api.github.com/users/dughetti/following{/other_user}","gists_url":"https://api.github.com/users/dughetti/gists{/gist_id}","starred_url":"https://api.github.com/users/dughetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dughetti/subscriptions","organizations_url":"https://api.github.com/users/dughetti/orgs","repos_url":"https://api.github.com/users/dughetti/repos","events_url":"https://api.github.com/users/dughetti/events{/privacy}","received_events_url":"https://api.github.com/users/dughetti/received_events","type":"User","site_admin":false},"body":"Add validation to allow POST to create activities only for the current user","created_at":"2014-12-19T13:35:27Z","updated_at":"2014-12-23T15:05:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6358342d73c972ca3153138bb915429d5f36fa9a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/natgeo/activitystreams/pulls/52/commits","review_comments_url":"https://api.github.com/repos/natgeo/activitystreams/pulls/52/comments","review_comment_url":"https://api.github.com/repos/natgeo/activitystreams/pulls/comments/{number}","comments_url":"https://api.github.com/repos/natgeo/activitystreams/issues/52/comments","statuses_url":"https://api.github.com/repos/natgeo/activitystreams/statuses/35c1b1d3dee762e2ef18c23b355754ad35af3d0d","head":{"label":"natgeo:feature/MIE-1633","ref":"feature/MIE-1633","sha":"35c1b1d3dee762e2ef18c23b355754ad35af3d0d","user":{"login":"natgeo","id":343010,"avatar_url":"https://avatars.githubusercontent.com/u/343010?v=3","gravatar_id":"","url":"https://api.github.com/users/natgeo","html_url":"https://github.com/natgeo","followers_url":"https://api.github.com/users/natgeo/followers","following_url":"https://api.github.com/users/natgeo/following{/other_user}","gists_url":"https://api.github.com/users/natgeo/gists{/gist_id}","starred_url":"https://api.github.com/users/natgeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natgeo/subscriptions","organizations_url":"https://api.github.com/users/natgeo/orgs","repos_url":"https://api.github.com/users/natgeo/repos","events_url":"https://api.github.com/users/natgeo/events{/privacy}","received_events_url":"https://api.github.com/users/natgeo/received_events","type":"Organization","site_admin":false},"repo":{"id":14966577,"name":"activitystreams","full_name":"natgeo/activitystreams","owner":{"login":"natgeo","id":343010,"avatar_url":"https://avatars.githubusercontent.com/u/343010?v=3","gravatar_id":"","url":"https://api.github.com/users/natgeo","html_url":"https://github.com/natgeo","followers_url":"https://api.github.com/users/natgeo/followers","following_url":"https://api.github.com/users/natgeo/following{/other_user}","gists_url":"https://api.github.com/users/natgeo/gists{/gist_id}","starred_url":"https://api.github.com/users/natgeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natgeo/subscriptions","organizations_url":"https://api.github.com/users/natgeo/orgs","repos_url":"https://api.github.com/users/natgeo/repos","events_url":"https://api.github.com/users/natgeo/events{/privacy}","received_events_url":"https://api.github.com/users/natgeo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/natgeo/activitystreams","description":"NatGeo Activity Streams","fork":false,"url":"https://api.github.com/repos/natgeo/activitystreams","forks_url":"https://api.github.com/repos/natgeo/activitystreams/forks","keys_url":"https://api.github.com/repos/natgeo/activitystreams/keys{/key_id}","collaborators_url":"https://api.github.com/repos/natgeo/activitystreams/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/natgeo/activitystreams/teams","hooks_url":"https://api.github.com/repos/natgeo/activitystreams/hooks","issue_events_url":"https://api.github.com/repos/natgeo/activitystreams/issues/events{/number}","events_url":"https://api.github.com/repos/natgeo/activitystreams/events","assignees_url":"https://api.github.com/repos/natgeo/activitystreams/assignees{/user}","branches_url":"https://api.github.com/repos/natgeo/activitystreams/branches{/branch}","tags_url":"https://api.github.com/repos/natgeo/activitystreams/tags","blobs_url":"https://api.github.com/repos/natgeo/activitystreams/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/natgeo/activitystreams/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/natgeo/activitystreams/git/refs{/sha}","trees_url":"https://api.github.com/repos/natgeo/activitystreams/git/trees{/sha}","statuses_url":"https://api.github.com/repos/natgeo/activitystreams/statuses/{sha}","languages_url":"https://api.github.com/repos/natgeo/activitystreams/languages","stargazers_url":"https://api.github.com/repos/natgeo/activitystreams/stargazers","contributors_url":"https://api.github.com/repos/natgeo/activitystreams/contributors","subscribers_url":"https://api.github.com/repos/natgeo/activitystreams/subscribers","subscription_url":"https://api.github.com/repos/natgeo/activitystreams/subscription","commits_url":"https://api.github.com/repos/natgeo/activitystreams/commits{/sha}","git_commits_url":"https://api.github.com/repos/natgeo/activitystreams/git/commits{/sha}","comments_url":"https://api.github.com/repos/natgeo/activitystreams/comments{/number}","issue_comment_url":"https://api.github.com/repos/natgeo/activitystreams/issues/comments/{number}","contents_url":"https://api.github.com/repos/natgeo/activitystreams/contents/{+path}","compare_url":"https://api.github.com/repos/natgeo/activitystreams/compare/{base}...{head}","merges_url":"https://api.github.com/repos/natgeo/activitystreams/merges","archive_url":"https://api.github.com/repos/natgeo/activitystreams/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/natgeo/activitystreams/downloads","issues_url":"https://api.github.com/repos/natgeo/activitystreams/issues{/number}","pulls_url":"https://api.github.com/repos/natgeo/activitystreams/pulls{/number}","milestones_url":"https://api.github.com/repos/natgeo/activitystreams/milestones{/number}","notifications_url":"https://api.github.com/repos/natgeo/activitystreams/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/natgeo/activitystreams/labels{/name}","releases_url":"https://api.github.com/repos/natgeo/activitystreams/releases{/id}","created_at":"2013-12-05T21:41:32Z","updated_at":"2014-12-15T20:07:17Z","pushed_at":"2014-12-23T14:04:18Z","git_url":"git://github.com/natgeo/activitystreams.git","ssh_url":"git@github.com:natgeo/activitystreams.git","clone_url":"https://github.com/natgeo/activitystreams.git","svn_url":"https://github.com/natgeo/activitystreams","homepage":"http://natgeo.github.io/activitystreams/","size":2129,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":16,"default_branch":"develop"}},"base":{"label":"natgeo:develop","ref":"develop","sha":"bd42d4ba9d32834d78db892c41f712044f6658ad","user":{"login":"natgeo","id":343010,"avatar_url":"https://avatars.githubusercontent.com/u/343010?v=3","gravatar_id":"","url":"https://api.github.com/users/natgeo","html_url":"https://github.com/natgeo","followers_url":"https://api.github.com/users/natgeo/followers","following_url":"https://api.github.com/users/natgeo/following{/other_user}","gists_url":"https://api.github.com/users/natgeo/gists{/gist_id}","starred_url":"https://api.github.com/users/natgeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natgeo/subscriptions","organizations_url":"https://api.github.com/users/natgeo/orgs","repos_url":"https://api.github.com/users/natgeo/repos","events_url":"https://api.github.com/users/natgeo/events{/privacy}","received_events_url":"https://api.github.com/users/natgeo/received_events","type":"Organization","site_admin":false},"repo":{"id":14966577,"name":"activitystreams","full_name":"natgeo/activitystreams","owner":{"login":"natgeo","id":343010,"avatar_url":"https://avatars.githubusercontent.com/u/343010?v=3","gravatar_id":"","url":"https://api.github.com/users/natgeo","html_url":"https://github.com/natgeo","followers_url":"https://api.github.com/users/natgeo/followers","following_url":"https://api.github.com/users/natgeo/following{/other_user}","gists_url":"https://api.github.com/users/natgeo/gists{/gist_id}","starred_url":"https://api.github.com/users/natgeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natgeo/subscriptions","organizations_url":"https://api.github.com/users/natgeo/orgs","repos_url":"https://api.github.com/users/natgeo/repos","events_url":"https://api.github.com/users/natgeo/events{/privacy}","received_events_url":"https://api.github.com/users/natgeo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/natgeo/activitystreams","description":"NatGeo Activity Streams","fork":false,"url":"https://api.github.com/repos/natgeo/activitystreams","forks_url":"https://api.github.com/repos/natgeo/activitystreams/forks","keys_url":"https://api.github.com/repos/natgeo/activitystreams/keys{/key_id}","collaborators_url":"https://api.github.com/repos/natgeo/activitystreams/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/natgeo/activitystreams/teams","hooks_url":"https://api.github.com/repos/natgeo/activitystreams/hooks","issue_events_url":"https://api.github.com/repos/natgeo/activitystreams/issues/events{/number}","events_url":"https://api.github.com/repos/natgeo/activitystreams/events","assignees_url":"https://api.github.com/repos/natgeo/activitystreams/assignees{/user}","branches_url":"https://api.github.com/repos/natgeo/activitystreams/branches{/branch}","tags_url":"https://api.github.com/repos/natgeo/activitystreams/tags","blobs_url":"https://api.github.com/repos/natgeo/activitystreams/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/natgeo/activitystreams/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/natgeo/activitystreams/git/refs{/sha}","trees_url":"https://api.github.com/repos/natgeo/activitystreams/git/trees{/sha}","statuses_url":"https://api.github.com/repos/natgeo/activitystreams/statuses/{sha}","languages_url":"https://api.github.com/repos/natgeo/activitystreams/languages","stargazers_url":"https://api.github.com/repos/natgeo/activitystreams/stargazers","contributors_url":"https://api.github.com/repos/natgeo/activitystreams/contributors","subscribers_url":"https://api.github.com/repos/natgeo/activitystreams/subscribers","subscription_url":"https://api.github.com/repos/natgeo/activitystreams/subscription","commits_url":"https://api.github.com/repos/natgeo/activitystreams/commits{/sha}","git_commits_url":"https://api.github.com/repos/natgeo/activitystreams/git/commits{/sha}","comments_url":"https://api.github.com/repos/natgeo/activitystreams/comments{/number}","issue_comment_url":"https://api.github.com/repos/natgeo/activitystreams/issues/comments/{number}","contents_url":"https://api.github.com/repos/natgeo/activitystreams/contents/{+path}","compare_url":"https://api.github.com/repos/natgeo/activitystreams/compare/{base}...{head}","merges_url":"https://api.github.com/repos/natgeo/activitystreams/merges","archive_url":"https://api.github.com/repos/natgeo/activitystreams/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/natgeo/activitystreams/downloads","issues_url":"https://api.github.com/repos/natgeo/activitystreams/issues{/number}","pulls_url":"https://api.github.com/repos/natgeo/activitystreams/pulls{/number}","milestones_url":"https://api.github.com/repos/natgeo/activitystreams/milestones{/number}","notifications_url":"https://api.github.com/repos/natgeo/activitystreams/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/natgeo/activitystreams/labels{/name}","releases_url":"https://api.github.com/repos/natgeo/activitystreams/releases{/id}","created_at":"2013-12-05T21:41:32Z","updated_at":"2014-12-15T20:07:17Z","pushed_at":"2014-12-23T14:04:18Z","git_url":"git://github.com/natgeo/activitystreams.git","ssh_url":"git@github.com:natgeo/activitystreams.git","clone_url":"https://github.com/natgeo/activitystreams.git","svn_url":"https://github.com/natgeo/activitystreams","homepage":"http://natgeo.github.io/activitystreams/","size":2129,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":16,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/natgeo/activitystreams/pulls/52"},"html":{"href":"https://github.com/natgeo/activitystreams/pull/52"},"issue":{"href":"https://api.github.com/repos/natgeo/activitystreams/issues/52"},"comments":{"href":"https://api.github.com/repos/natgeo/activitystreams/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/natgeo/activitystreams/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/natgeo/activitystreams/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/natgeo/activitystreams/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/natgeo/activitystreams/statuses/35c1b1d3dee762e2ef18c23b355754ad35af3d0d"}}}}