GitHub PullRequestReviewCommentEvent at 2014-07-03 14:51:08
Repository: login
Actor: barnabyalter
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/NYULibraries/login/pulls/comments/14517534","id":14517534,"diff_hunk":"@@ -70,10 +71,76 @@\n           end\n \n           context \"and the user's identity provider is NYU Shibboleth\" do\n+            let(:provider) { \"nyu_shibboleth\" }\n+            let(:response_properties) { JSON.parse(response.body)[\"identities\"].first[\"properties\"] }\n+            let(:resource_owner_properties) { resource_owner.identities.first.properties }\n+            let(:property) { \"uid\" }\n+\n+            context \"when querying raw JSON\" do\n+              subject{ response.body }\n+              it { should have_json_path(\"identities/0/properties/uid\") }\n+              it { should have_json_path(\"identities/0/properties/nyuidn\") }\n+              it { should have_json_path(\"identities/0/properties/first_name\") }\n+              it { should have_json_path(\"identities/0/properties/last_name\") }\n+              it { should have_json_path(\"identities/0/properties/extra/entitlement\") }\n+              it { should be_json_eql(resource_owner.to_json(include: :identities))}\n \n+            end\n+\n+            subject { response_properties[property] }\n+\n+            context \"when querying the NetID\" do\n+              it { should eql resource_owner_properties[property] }\n+            end\n+\n+            context \"when querying the N Number\" do\n+              let(:property) { \"nyuidn\" }\n+              it { should eql resource_owner_properties[property] }\n+            end\n+\n+            context \"when querying the Given Name\" do\n+              let(:property) { \"first_name\" }\n+              it { should eql resource_owner_properties[property] }\n+            end\n+\n+            context \"when querying the SurName\" do\n+              let(:property) { \"last_name\" }\n+              it { should eql resource_owner_properties[property] }\n+            end\n+\n+            context \"when querying the Entitlement\" do\n+              let(:property) { \"entitlement\" }\n+\n+              it { should eql resource_owner_properties[property] }\n+            end\n           end\n \n           context \"and the user's identity provider is New School LDAP\" do\n+            let(:provider) { \"new_school_ldap\" }\n+            let(:response_properties) { JSON.parse(response.body)[\"identities\"].first[\"properties\"] }\n+            let(:resource_owner_properties) { resource_owner.identities.first.properties }\n+            let(:property) { \"uid\" }\n+\n+            subject { response_properties[property] }\n+\n+            context \"when querying the NetID\" do\n+              it { should eql resource_owner_properties[property] }\n+            end\n+\n+            context \"when querying the N Number\" do\n+              let(:property) { \"nyuidn\" }\n+              it { should eql resource_owner_properties[property] }\n+            end\n+\n+            context \"when querying the Given Name\" do\n+              let(:property) { \"first_name\" }\n+              it { should eql resource_owner_properties[property] }\n+            end\n+\n+            context \"when querying the SurName\" do\n+              let(:property) { \"last_name\" }\n+              it { should eql resource_owner_properties[property] }\n+            end\n \n           end\n ","path":"spec/controllers/api/v1/users_controller_spec.rb","position":84,"original_position":84,"commit_id":"d618bcd08317b6e50d042fd041ea36db79190296","original_commit_id":"d618bcd08317b6e50d042fd041ea36db79190296","user":{"login":"barnabyalter","id":30699,"avatar_url":"https://avatars.githubusercontent.com/u/30699?","gravatar_id":"46e66d95928a2d866aebe186842aa454","url":"https://api.github.com/users/barnabyalter","html_url":"https://github.com/barnabyalter","followers_url":"https://api.github.com/users/barnabyalter/followers","following_url":"https://api.github.com/users/barnabyalter/following{/other_user}","gists_url":"https://api.github.com/users/barnabyalter/gists{/gist_id}","starred_url":"https://api.github.com/users/barnabyalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barnabyalter/subscriptions","organizations_url":"https://api.github.com/users/barnabyalter/orgs","repos_url":"https://api.github.com/users/barnabyalter/repos","events_url":"https://api.github.com/users/barnabyalter/events{/privacy}","received_events_url":"https://api.github.com/users/barnabyalter/received_events","type":"User","site_admin":false},"body":"        context \"and it's valid\" do\r\n          set_valid_access_token\r\n          ...\r\n          describe 'body' do\r\n            subject { response.body }\r\n            context \"and the user's identity provider is NYU Shibboleth\" do\r\n              describe \"identity properties\" do\r\n                let(:response_properties) { ... }\r\n                context \"when property is NetID\" do\r\n                  let(:property) { \"uid\" }\r\n                  it { should eql \"js123\" }\r\n                end\r\n                context \"when property is ...\" do\r\n                  ...\r\n                end\r\n              end\r\n            end\r\n          end\r\n        end","created_at":"2014-07-03T14:51:08Z","updated_at":"2014-07-03T14:51:08Z","html_url":"https://github.com/NYULibraries/login/pull/32#discussion_r14517534","pull_request_url":"https://api.github.com/repos/NYULibraries/login/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/NYULibraries/login/pulls/comments/14517534"},"html":{"href":"https://github.com/NYULibraries/login/pull/32#discussion_r14517534"},"pull_request":{"href":"https://api.github.com/repos/NYULibraries/login/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/NYULibraries/login/pulls/32","id":17946897,"html_url":"https://github.com/NYULibraries/login/pull/32","diff_url":"https://github.com/NYULibraries/login/pull/32.diff","patch_url":"https://github.com/NYULibraries/login/pull/32.patch","issue_url":"https://api.github.com/repos/NYULibraries/login/issues/32","number":32,"state":"open","title":"Feature/shibboleth api","user":{"login":"hab278","id":1816283,"avatar_url":"https://avatars.githubusercontent.com/u/1816283?","gravatar_id":"11c788170ae7c0098424ee1424d8157c","url":"https://api.github.com/users/hab278","html_url":"https://github.com/hab278","followers_url":"https://api.github.com/users/hab278/followers","following_url":"https://api.github.com/users/hab278/following{/other_user}","gists_url":"https://api.github.com/users/hab278/gists{/gist_id}","starred_url":"https://api.github.com/users/hab278/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hab278/subscriptions","organizations_url":"https://api.github.com/users/hab278/orgs","repos_url":"https://api.github.com/users/hab278/repos","events_url":"https://api.github.com/users/hab278/events{/privacy}","received_events_url":"https://api.github.com/users/hab278/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-07-03T14:22:38Z","updated_at":"2014-07-03T14:51:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1706a1e8afbdb781d84dae72223cb25713252f18","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NYULibraries/login/pulls/32/commits","review_comments_url":"https://api.github.com/repos/NYULibraries/login/pulls/32/comments","review_comment_url":"https://api.github.com/repos/NYULibraries/login/pulls/comments/{number}","comments_url":"https://api.github.com/repos/NYULibraries/login/issues/32/comments","statuses_url":"https://api.github.com/repos/NYULibraries/login/statuses/d618bcd08317b6e50d042fd041ea36db79190296","head":{"label":"NYULibraries:feature/shibboleth-api","ref":"feature/shibboleth-api","sha":"d618bcd08317b6e50d042fd041ea36db79190296","user":{"login":"NYULibraries","id":1707000,"avatar_url":"https://avatars.githubusercontent.com/u/1707000?","gravatar_id":"233b3a869ae6a9d2ea2014d08a22418d","url":"https://api.github.com/users/NYULibraries","html_url":"https://github.com/NYULibraries","followers_url":"https://api.github.com/users/NYULibraries/followers","following_url":"https://api.github.com/users/NYULibraries/following{/other_user}","gists_url":"https://api.github.com/users/NYULibraries/gists{/gist_id}","starred_url":"https://api.github.com/users/NYULibraries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYULibraries/subscriptions","organizations_url":"https://api.github.com/users/NYULibraries/orgs","repos_url":"https://api.github.com/users/NYULibraries/repos","events_url":"https://api.github.com/users/NYULibraries/events{/privacy}","received_events_url":"https://api.github.com/users/NYULibraries/received_events","type":"Organization","site_admin":false},"repo":{"id":16213344,"name":"login","full_name":"NYULibraries/login","owner":{"login":"NYULibraries","id":1707000,"avatar_url":"https://avatars.githubusercontent.com/u/1707000?","gravatar_id":"233b3a869ae6a9d2ea2014d08a22418d","url":"https://api.github.com/users/NYULibraries","html_url":"https://github.com/NYULibraries","followers_url":"https://api.github.com/users/NYULibraries/followers","following_url":"https://api.github.com/users/NYULibraries/following{/other_user}","gists_url":"https://api.github.com/users/NYULibraries/gists{/gist_id}","starred_url":"https://api.github.com/users/NYULibraries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYULibraries/subscriptions","organizations_url":"https://api.github.com/users/NYULibraries/orgs","repos_url":"https://api.github.com/users/NYULibraries/repos","events_url":"https://api.github.com/users/NYULibraries/events{/privacy}","received_events_url":"https://api.github.com/users/NYULibraries/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYULibraries/login","description":"NYU Libraries Login Application","fork":false,"url":"https://api.github.com/repos/NYULibraries/login","forks_url":"https://api.github.com/repos/NYULibraries/login/forks","keys_url":"https://api.github.com/repos/NYULibraries/login/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYULibraries/login/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYULibraries/login/teams","hooks_url":"https://api.github.com/repos/NYULibraries/login/hooks","issue_events_url":"https://api.github.com/repos/NYULibraries/login/issues/events{/number}","events_url":"https://api.github.com/repos/NYULibraries/login/events","assignees_url":"https://api.github.com/repos/NYULibraries/login/assignees{/user}","branches_url":"https://api.github.com/repos/NYULibraries/login/branches{/branch}","tags_url":"https://api.github.com/repos/NYULibraries/login/tags","blobs_url":"https://api.github.com/repos/NYULibraries/login/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYULibraries/login/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYULibraries/login/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYULibraries/login/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYULibraries/login/statuses/{sha}","languages_url":"https://api.github.com/repos/NYULibraries/login/languages","stargazers_url":"https://api.github.com/repos/NYULibraries/login/stargazers","contributors_url":"https://api.github.com/repos/NYULibraries/login/contributors","subscribers_url":"https://api.github.com/repos/NYULibraries/login/subscribers","subscription_url":"https://api.github.com/repos/NYULibraries/login/subscription","commits_url":"https://api.github.com/repos/NYULibraries/login/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYULibraries/login/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYULibraries/login/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYULibraries/login/issues/comments/{number}","contents_url":"https://api.github.com/repos/NYULibraries/login/contents/{+path}","compare_url":"https://api.github.com/repos/NYULibraries/login/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYULibraries/login/merges","archive_url":"https://api.github.com/repos/NYULibraries/login/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYULibraries/login/downloads","issues_url":"https://api.github.com/repos/NYULibraries/login/issues{/number}","pulls_url":"https://api.github.com/repos/NYULibraries/login/pulls{/number}","milestones_url":"https://api.github.com/repos/NYULibraries/login/milestones{/number}","notifications_url":"https://api.github.com/repos/NYULibraries/login/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYULibraries/login/labels{/name}","releases_url":"https://api.github.com/repos/NYULibraries/login/releases{/id}","created_at":"2014-01-24T18:45:06Z","updated_at":"2014-07-01T18:12:57Z","pushed_at":"2014-07-02T20:29:52Z","git_url":"git://github.com/NYULibraries/login.git","ssh_url":"git@github.com:NYULibraries/login.git","clone_url":"https://github.com/NYULibraries/login.git","svn_url":"https://github.com/NYULibraries/login","homepage":null,"size":1836,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"development"}},"base":{"label":"NYULibraries:development","ref":"development","sha":"08954d832d42a08f0a745950a63d4d8526a45176","user":{"login":"NYULibraries","id":1707000,"avatar_url":"https://avatars.githubusercontent.com/u/1707000?","gravatar_id":"233b3a869ae6a9d2ea2014d08a22418d","url":"https://api.github.com/users/NYULibraries","html_url":"https://github.com/NYULibraries","followers_url":"https://api.github.com/users/NYULibraries/followers","following_url":"https://api.github.com/users/NYULibraries/following{/other_user}","gists_url":"https://api.github.com/users/NYULibraries/gists{/gist_id}","starred_url":"https://api.github.com/users/NYULibraries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYULibraries/subscriptions","organizations_url":"https://api.github.com/users/NYULibraries/orgs","repos_url":"https://api.github.com/users/NYULibraries/repos","events_url":"https://api.github.com/users/NYULibraries/events{/privacy}","received_events_url":"https://api.github.com/users/NYULibraries/received_events","type":"Organization","site_admin":false},"repo":{"id":16213344,"name":"login","full_name":"NYULibraries/login","owner":{"login":"NYULibraries","id":1707000,"avatar_url":"https://avatars.githubusercontent.com/u/1707000?","gravatar_id":"233b3a869ae6a9d2ea2014d08a22418d","url":"https://api.github.com/users/NYULibraries","html_url":"https://github.com/NYULibraries","followers_url":"https://api.github.com/users/NYULibraries/followers","following_url":"https://api.github.com/users/NYULibraries/following{/other_user}","gists_url":"https://api.github.com/users/NYULibraries/gists{/gist_id}","starred_url":"https://api.github.com/users/NYULibraries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYULibraries/subscriptions","organizations_url":"https://api.github.com/users/NYULibraries/orgs","repos_url":"https://api.github.com/users/NYULibraries/repos","events_url":"https://api.github.com/users/NYULibraries/events{/privacy}","received_events_url":"https://api.github.com/users/NYULibraries/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYULibraries/login","description":"NYU Libraries Login Application","fork":false,"url":"https://api.github.com/repos/NYULibraries/login","forks_url":"https://api.github.com/repos/NYULibraries/login/forks","keys_url":"https://api.github.com/repos/NYULibraries/login/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYULibraries/login/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYULibraries/login/teams","hooks_url":"https://api.github.com/repos/NYULibraries/login/hooks","issue_events_url":"https://api.github.com/repos/NYULibraries/login/issues/events{/number}","events_url":"https://api.github.com/repos/NYULibraries/login/events","assignees_url":"https://api.github.com/repos/NYULibraries/login/assignees{/user}","branches_url":"https://api.github.com/repos/NYULibraries/login/branches{/branch}","tags_url":"https://api.github.com/repos/NYULibraries/login/tags","blobs_url":"https://api.github.com/repos/NYULibraries/login/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYULibraries/login/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYULibraries/login/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYULibraries/login/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYULibraries/login/statuses/{sha}","languages_url":"https://api.github.com/repos/NYULibraries/login/languages","stargazers_url":"https://api.github.com/repos/NYULibraries/login/stargazers","contributors_url":"https://api.github.com/repos/NYULibraries/login/contributors","subscribers_url":"https://api.github.com/repos/NYULibraries/login/subscribers","subscription_url":"https://api.github.com/repos/NYULibraries/login/subscription","commits_url":"https://api.github.com/repos/NYULibraries/login/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYULibraries/login/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYULibraries/login/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYULibraries/login/issues/comments/{number}","contents_url":"https://api.github.com/repos/NYULibraries/login/contents/{+path}","compare_url":"https://api.github.com/repos/NYULibraries/login/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYULibraries/login/merges","archive_url":"https://api.github.com/repos/NYULibraries/login/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYULibraries/login/downloads","issues_url":"https://api.github.com/repos/NYULibraries/login/issues{/number}","pulls_url":"https://api.github.com/repos/NYULibraries/login/pulls{/number}","milestones_url":"https://api.github.com/repos/NYULibraries/login/milestones{/number}","notifications_url":"https://api.github.com/repos/NYULibraries/login/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYULibraries/login/labels{/name}","releases_url":"https://api.github.com/repos/NYULibraries/login/releases{/id}","created_at":"2014-01-24T18:45:06Z","updated_at":"2014-07-01T18:12:57Z","pushed_at":"2014-07-02T20:29:52Z","git_url":"git://github.com/NYULibraries/login.git","ssh_url":"git@github.com:NYULibraries/login.git","clone_url":"https://github.com/NYULibraries/login.git","svn_url":"https://github.com/NYULibraries/login","homepage":null,"size":1836,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/NYULibraries/login/pulls/32"},"html":{"href":"https://github.com/NYULibraries/login/pull/32"},"issue":{"href":"https://api.github.com/repos/NYULibraries/login/issues/32"},"comments":{"href":"https://api.github.com/repos/NYULibraries/login/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/NYULibraries/login/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/NYULibraries/login/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/NYULibraries/login/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/NYULibraries/login/statuses/d618bcd08317b6e50d042fd041ea36db79190296"}}}}