{"action":"created","comment":{"url":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/comments/52455258","id":52455258,"diff_hunk":"@@ -0,0 +1,177 @@\n+'use strict';\n+\n+import chai from 'chai';\n+import {IdentityProvider} from '../lib/IdentityProvider';\n+import {MissingLoginProviderException} from '../lib/Exception/MissingLoginProviderException';\n+import {IdentityProviderMismatchException} from '../lib/Exception/IdentityProviderMismatchException';\n+import {InvalidProviderIdentityException} from '../lib/Exception/InvalidProviderIdentityException';\n+\n+suite('IdentityProvider', () => {\n+  let identityProvider = null;\n+  let providerName = 'facebook';\n+  let date = new Date();\n+\n+  // add a day\n+  date.setDate(date.getDate() + 1);\n+\n+  let identityMetadata = {\n+    access_token: 'test_userToken',\n+    tokenExpirationTime: date,\n+    user_id: 'test_userId',\n+  };\n+  let providers = {\n+    amazon: {\n+      name: IdentityProvider.AMAZON,\n+      data: {},\n+    },\n+    facebook: {\n+      name: IdentityProvider.FACEBOOK,\n+      data: {},\n+    },\n+    google: {\n+      name: IdentityProvider.GOOGLE,\n+      data: {},\n+    },\n+  };\n+\n+  test('Class IdentityProvider exists in IdentityProvider', () => {\n+    chai.expect(IdentityProvider).to.be.an('function');\n+  });\n+\n+  test('Check AMAZON static getter returns value \"www.amazon.com\"', () => {\n+    chai.expect(IdentityProvider.AMAZON).to.be.equal('www.amazon.com');\n+  });\n+\n+  test('Check FACEBOOK static getter returns value \"graph.facebook.com\"', () => {\n+    chai.expect(IdentityProvider.FACEBOOK).to.be.equal('graph.facebook.com');\n+  });\n+\n+  test('Check GOOGLE static getter returns value \"graph.facebook.com\"', () => {\n+    chai.expect(IdentityProvider.GOOGLE).to.be.equal('accounts.google.com');\n+  });\n+\n+  test('Check constructor sets values by default', () => {\n+    identityProvider = new IdentityProvider(providers, providerName, identityMetadata);\n+\n+    chai.expect(identityProvider.providers).to.be.eql(providers);\n+    chai.expect(identityProvider.name).to.be.eql(providerName);\n+    chai.expect(identityProvider.userToken).to.be.eql(identityMetadata.access_token);\n+    chai.expect(identityProvider.userId).to.be.eql(identityMetadata.user_id);","path":"src/deep-security/test/IdentityProvider.spec.js","position":59,"original_position":59,"commit_id":"502b4c5de3572d2f4ee57e835daf12c3aaf14055","original_commit_id":"502b4c5de3572d2f4ee57e835daf12c3aaf14055","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Identifier 'user_id' is not in camel case.","created_at":"2016-02-10T13:19:25Z","updated_at":"2016-02-10T13:19:25Z","html_url":"https://github.com/MitocGroup/deep-framework/pull/227#discussion_r52455258","pull_request_url":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/227","_links":{"self":{"href":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/comments/52455258"},"html":{"href":"https://github.com/MitocGroup/deep-framework/pull/227#discussion_r52455258"},"pull_request":{"href":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/227"}}},"pull_request":{"url":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/227","id":58888969,"html_url":"https://github.com/MitocGroup/deep-framework/pull/227","diff_url":"https://github.com/MitocGroup/deep-framework/pull/227.diff","patch_url":"https://github.com/MitocGroup/deep-framework/pull/227.patch","issue_url":"https://api.github.com/repos/MitocGroup/deep-framework/issues/227","number":227,"state":"open","locked":false,"title":"Merge dev branch","user":{"login":"AlexanderC","id":1415757,"avatar_url":"https://avatars.githubusercontent.com/u/1415757?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderC","html_url":"https://github.com/AlexanderC","followers_url":"https://api.github.com/users/AlexanderC/followers","following_url":"https://api.github.com/users/AlexanderC/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderC/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderC/subscriptions","organizations_url":"https://api.github.com/users/AlexanderC/orgs","repos_url":"https://api.github.com/users/AlexanderC/repos","events_url":"https://api.github.com/users/AlexanderC/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderC/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-10T13:18:14Z","updated_at":"2016-02-10T13:19:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a91d71f344c317024096b33edb00ef0ca6253ff7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/227/commits","review_comments_url":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/227/comments","review_comment_url":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MitocGroup/deep-framework/issues/227/comments","statuses_url":"https://api.github.com/repos/MitocGroup/deep-framework/statuses/502b4c5de3572d2f4ee57e835daf12c3aaf14055","head":{"label":"MitocGroup:dev","ref":"dev","sha":"502b4c5de3572d2f4ee57e835daf12c3aaf14055","user":{"login":"MitocGroup","id":8398780,"avatar_url":"https://avatars.githubusercontent.com/u/8398780?v=3","gravatar_id":"","url":"https://api.github.com/users/MitocGroup","html_url":"https://github.com/MitocGroup","followers_url":"https://api.github.com/users/MitocGroup/followers","following_url":"https://api.github.com/users/MitocGroup/following{/other_user}","gists_url":"https://api.github.com/users/MitocGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/MitocGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MitocGroup/subscriptions","organizations_url":"https://api.github.com/users/MitocGroup/orgs","repos_url":"https://api.github.com/users/MitocGroup/repos","events_url":"https://api.github.com/users/MitocGroup/events{/privacy}","received_events_url":"https://api.github.com/users/MitocGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":43718196,"name":"deep-framework","full_name":"MitocGroup/deep-framework","owner":{"login":"MitocGroup","id":8398780,"avatar_url":"https://avatars.githubusercontent.com/u/8398780?v=3","gravatar_id":"","url":"https://api.github.com/users/MitocGroup","html_url":"https://github.com/MitocGroup","followers_url":"https://api.github.com/users/MitocGroup/followers","following_url":"https://api.github.com/users/MitocGroup/following{/other_user}","gists_url":"https://api.github.com/users/MitocGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/MitocGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MitocGroup/subscriptions","organizations_url":"https://api.github.com/users/MitocGroup/orgs","repos_url":"https://api.github.com/users/MitocGroup/repos","events_url":"https://api.github.com/users/MitocGroup/events{/privacy}","received_events_url":"https://api.github.com/users/MitocGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MitocGroup/deep-framework","description":"Serverless Web Framework for Cloud-Native Applications and Platforms using Microservices Architecture","fork":false,"url":"https://api.github.com/repos/MitocGroup/deep-framework","forks_url":"https://api.github.com/repos/MitocGroup/deep-framework/forks","keys_url":"https://api.github.com/repos/MitocGroup/deep-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MitocGroup/deep-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MitocGroup/deep-framework/teams","hooks_url":"https://api.github.com/repos/MitocGroup/deep-framework/hooks","issue_events_url":"https://api.github.com/repos/MitocGroup/deep-framework/issues/events{/number}","events_url":"https://api.github.com/repos/MitocGroup/deep-framework/events","assignees_url":"https://api.github.com/repos/MitocGroup/deep-framework/assignees{/user}","branches_url":"https://api.github.com/repos/MitocGroup/deep-framework/branches{/branch}","tags_url":"https://api.github.com/repos/MitocGroup/deep-framework/tags","blobs_url":"https://api.github.com/repos/MitocGroup/deep-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MitocGroup/deep-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MitocGroup/deep-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/MitocGroup/deep-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MitocGroup/deep-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/MitocGroup/deep-framework/languages","stargazers_url":"https://api.github.com/repos/MitocGroup/deep-framework/stargazers","contributors_url":"https://api.github.com/repos/MitocGroup/deep-framework/contributors","subscribers_url":"https://api.github.com/repos/MitocGroup/deep-framework/subscribers","subscription_url":"https://api.github.com/repos/MitocGroup/deep-framework/subscription","commits_url":"https://api.github.com/repos/MitocGroup/deep-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/MitocGroup/deep-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/MitocGroup/deep-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/MitocGroup/deep-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/MitocGroup/deep-framework/contents/{+path}","compare_url":"https://api.github.com/repos/MitocGroup/deep-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MitocGroup/deep-framework/merges","archive_url":"https://api.github.com/repos/MitocGroup/deep-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MitocGroup/deep-framework/downloads","issues_url":"https://api.github.com/repos/MitocGroup/deep-framework/issues{/number}","pulls_url":"https://api.github.com/repos/MitocGroup/deep-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/MitocGroup/deep-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/MitocGroup/deep-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MitocGroup/deep-framework/labels{/name}","releases_url":"https://api.github.com/repos/MitocGroup/deep-framework/releases{/id}","deployments_url":"https://api.github.com/repos/MitocGroup/deep-framework/deployments","created_at":"2015-10-05T22:48:47Z","updated_at":"2016-02-10T11:43:26Z","pushed_at":"2016-02-10T13:18:14Z","git_url":"git://github.com/MitocGroup/deep-framework.git","ssh_url":"git@github.com:MitocGroup/deep-framework.git","clone_url":"https://github.com/MitocGroup/deep-framework.git","svn_url":"https://github.com/MitocGroup/deep-framework","homepage":"http://docs.deep.mg","size":9607,"stargazers_count":213,"watchers_count":213,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":14,"forks":21,"open_issues":14,"watchers":213,"default_branch":"master"}},"base":{"label":"MitocGroup:master","ref":"master","sha":"001b521e1b125e0a0ea73558bac740cb29608f18","user":{"login":"MitocGroup","id":8398780,"avatar_url":"https://avatars.githubusercontent.com/u/8398780?v=3","gravatar_id":"","url":"https://api.github.com/users/MitocGroup","html_url":"https://github.com/MitocGroup","followers_url":"https://api.github.com/users/MitocGroup/followers","following_url":"https://api.github.com/users/MitocGroup/following{/other_user}","gists_url":"https://api.github.com/users/MitocGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/MitocGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MitocGroup/subscriptions","organizations_url":"https://api.github.com/users/MitocGroup/orgs","repos_url":"https://api.github.com/users/MitocGroup/repos","events_url":"https://api.github.com/users/MitocGroup/events{/privacy}","received_events_url":"https://api.github.com/users/MitocGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":43718196,"name":"deep-framework","full_name":"MitocGroup/deep-framework","owner":{"login":"MitocGroup","id":8398780,"avatar_url":"https://avatars.githubusercontent.com/u/8398780?v=3","gravatar_id":"","url":"https://api.github.com/users/MitocGroup","html_url":"https://github.com/MitocGroup","followers_url":"https://api.github.com/users/MitocGroup/followers","following_url":"https://api.github.com/users/MitocGroup/following{/other_user}","gists_url":"https://api.github.com/users/MitocGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/MitocGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MitocGroup/subscriptions","organizations_url":"https://api.github.com/users/MitocGroup/orgs","repos_url":"https://api.github.com/users/MitocGroup/repos","events_url":"https://api.github.com/users/MitocGroup/events{/privacy}","received_events_url":"https://api.github.com/users/MitocGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MitocGroup/deep-framework","description":"Serverless Web Framework for Cloud-Native Applications and Platforms using Microservices Architecture","fork":false,"url":"https://api.github.com/repos/MitocGroup/deep-framework","forks_url":"https://api.github.com/repos/MitocGroup/deep-framework/forks","keys_url":"https://api.github.com/repos/MitocGroup/deep-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MitocGroup/deep-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MitocGroup/deep-framework/teams","hooks_url":"https://api.github.com/repos/MitocGroup/deep-framework/hooks","issue_events_url":"https://api.github.com/repos/MitocGroup/deep-framework/issues/events{/number}","events_url":"https://api.github.com/repos/MitocGroup/deep-framework/events","assignees_url":"https://api.github.com/repos/MitocGroup/deep-framework/assignees{/user}","branches_url":"https://api.github.com/repos/MitocGroup/deep-framework/branches{/branch}","tags_url":"https://api.github.com/repos/MitocGroup/deep-framework/tags","blobs_url":"https://api.github.com/repos/MitocGroup/deep-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MitocGroup/deep-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MitocGroup/deep-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/MitocGroup/deep-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MitocGroup/deep-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/MitocGroup/deep-framework/languages","stargazers_url":"https://api.github.com/repos/MitocGroup/deep-framework/stargazers","contributors_url":"https://api.github.com/repos/MitocGroup/deep-framework/contributors","subscribers_url":"https://api.github.com/repos/MitocGroup/deep-framework/subscribers","subscription_url":"https://api.github.com/repos/MitocGroup/deep-framework/subscription","commits_url":"https://api.github.com/repos/MitocGroup/deep-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/MitocGroup/deep-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/MitocGroup/deep-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/MitocGroup/deep-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/MitocGroup/deep-framework/contents/{+path}","compare_url":"https://api.github.com/repos/MitocGroup/deep-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MitocGroup/deep-framework/merges","archive_url":"https://api.github.com/repos/MitocGroup/deep-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MitocGroup/deep-framework/downloads","issues_url":"https://api.github.com/repos/MitocGroup/deep-framework/issues{/number}","pulls_url":"https://api.github.com/repos/MitocGroup/deep-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/MitocGroup/deep-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/MitocGroup/deep-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MitocGroup/deep-framework/labels{/name}","releases_url":"https://api.github.com/repos/MitocGroup/deep-framework/releases{/id}","deployments_url":"https://api.github.com/repos/MitocGroup/deep-framework/deployments","created_at":"2015-10-05T22:48:47Z","updated_at":"2016-02-10T11:43:26Z","pushed_at":"2016-02-10T13:18:14Z","git_url":"git://github.com/MitocGroup/deep-framework.git","ssh_url":"git@github.com:MitocGroup/deep-framework.git","clone_url":"https://github.com/MitocGroup/deep-framework.git","svn_url":"https://github.com/MitocGroup/deep-framework","homepage":"http://docs.deep.mg","size":9607,"stargazers_count":213,"watchers_count":213,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":14,"forks":21,"open_issues":14,"watchers":213,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/227"},"html":{"href":"https://github.com/MitocGroup/deep-framework/pull/227"},"issue":{"href":"https://api.github.com/repos/MitocGroup/deep-framework/issues/227"},"comments":{"href":"https://api.github.com/repos/MitocGroup/deep-framework/issues/227/comments"},"review_comments":{"href":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/227/comments"},"review_comment":{"href":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MitocGroup/deep-framework/pulls/227/commits"},"statuses":{"href":"https://api.github.com/repos/MitocGroup/deep-framework/statuses/502b4c5de3572d2f4ee57e835daf12c3aaf14055"}}}}