{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/comments/29323209","id":29323209,"diff_hunk":"@@ -140,6 +140,36 @@ function (bdd, assert, RedirectBroker, WindowMock, sinon, p) {\n         });\n       });\n     });\n+\n+    bdd.describe('bestChoice', function () {\n+      bdd.it('should reject if `scope` is not specified', function () {\n+        return testMissingOption('bestChoice', 'scope');\n+      });\n+\n+      bdd.it('should reject if `redirectUri` is not specified', function () {\n+        return testMissingOption('bestChoice', 'redirectUri');\n+      });\n+\n+      bdd.it('should reject if `state` is not specified', function () {\n+        return testMissingOption('bestChoice', 'state');\n+      });\n+\n+      bdd.it('should redirect with no action and other expected query parameters', function () {\n+        return redirectAPI.bestChoice({\n+          state: 'state',\n+          scope: 'scope',\n+          redirectUri: 'redirectUri'\n+        })\n+            .then(function () {\n+              var redirectedTo = windowMock.location.href;\n+              assert.notInclude(redirectedTo, 'action=signUp');\n+              assert.notInclude(redirectedTo, 'action=signIn');\n+              assert.include(redirectedTo, 'state=state');","path":"tests/spec/auth/redirect/api.js","position":28,"original_position":28,"commit_id":"d0967ccd97dbe7e2debec1f931b7550dfe320276","original_commit_id":"d0967ccd97dbe7e2debec1f931b7550dfe320276","user":{"login":"shane-tomlinson","id":848085,"avatar_url":"https://avatars.githubusercontent.com/u/848085?v=3","gravatar_id":"","url":"https://api.github.com/users/shane-tomlinson","html_url":"https://github.com/shane-tomlinson","followers_url":"https://api.github.com/users/shane-tomlinson/followers","following_url":"https://api.github.com/users/shane-tomlinson/following{/other_user}","gists_url":"https://api.github.com/users/shane-tomlinson/gists{/gist_id}","starred_url":"https://api.github.com/users/shane-tomlinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shane-tomlinson/subscriptions","organizations_url":"https://api.github.com/users/shane-tomlinson/orgs","repos_url":"https://api.github.com/users/shane-tomlinson/repos","events_url":"https://api.github.com/users/shane-tomlinson/events{/privacy}","received_events_url":"https://api.github.com/users/shane-tomlinson/received_events","type":"User","site_admin":false},"body":"I always forget about `assert.include`, it would probably be helpful for the tests in */api.js above.","created_at":"2015-04-29T10:02:39Z","updated_at":"2015-04-29T10:02:39Z","html_url":"https://github.com/mozilla/fxa-relier-client/pull/56#discussion_r29323209","pull_request_url":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/comments/29323209"},"html":{"href":"https://github.com/mozilla/fxa-relier-client/pull/56#discussion_r29323209"},"pull_request":{"href":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/56","id":34281392,"html_url":"https://github.com/mozilla/fxa-relier-client/pull/56","diff_url":"https://github.com/mozilla/fxa-relier-client/pull/56.diff","patch_url":"https://github.com/mozilla/fxa-relier-client/pull/56.patch","issue_url":"https://api.github.com/repos/mozilla/fxa-relier-client/issues/56","number":56,"state":"open","locked":false,"title":"feat(auth): add a bestChoice option that omits the action parameter","user":{"login":"vladikoff","id":128755,"avatar_url":"https://avatars.githubusercontent.com/u/128755?v=3","gravatar_id":"","url":"https://api.github.com/users/vladikoff","html_url":"https://github.com/vladikoff","followers_url":"https://api.github.com/users/vladikoff/followers","following_url":"https://api.github.com/users/vladikoff/following{/other_user}","gists_url":"https://api.github.com/users/vladikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/vladikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladikoff/subscriptions","organizations_url":"https://api.github.com/users/vladikoff/orgs","repos_url":"https://api.github.com/users/vladikoff/repos","events_url":"https://api.github.com/users/vladikoff/events{/privacy}","received_events_url":"https://api.github.com/users/vladikoff/received_events","type":"User","site_admin":false},"body":"This is require for the new `/oauth` route on the content server","created_at":"2015-04-28T15:50:24Z","updated_at":"2015-04-29T10:02:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67f5c5157e71964be193f2aaa7c09d1a2d036b7a","assignee":{"login":"shane-tomlinson","id":848085,"avatar_url":"https://avatars.githubusercontent.com/u/848085?v=3","gravatar_id":"","url":"https://api.github.com/users/shane-tomlinson","html_url":"https://github.com/shane-tomlinson","followers_url":"https://api.github.com/users/shane-tomlinson/followers","following_url":"https://api.github.com/users/shane-tomlinson/following{/other_user}","gists_url":"https://api.github.com/users/shane-tomlinson/gists{/gist_id}","starred_url":"https://api.github.com/users/shane-tomlinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shane-tomlinson/subscriptions","organizations_url":"https://api.github.com/users/shane-tomlinson/orgs","repos_url":"https://api.github.com/users/shane-tomlinson/repos","events_url":"https://api.github.com/users/shane-tomlinson/events{/privacy}","received_events_url":"https://api.github.com/users/shane-tomlinson/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/56/commits","review_comments_url":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/56/comments","review_comment_url":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/fxa-relier-client/issues/56/comments","statuses_url":"https://api.github.com/repos/mozilla/fxa-relier-client/statuses/d0967ccd97dbe7e2debec1f931b7550dfe320276","head":{"label":"vladikoff:bestChoice","ref":"bestChoice","sha":"d0967ccd97dbe7e2debec1f931b7550dfe320276","user":{"login":"vladikoff","id":128755,"avatar_url":"https://avatars.githubusercontent.com/u/128755?v=3","gravatar_id":"","url":"https://api.github.com/users/vladikoff","html_url":"https://github.com/vladikoff","followers_url":"https://api.github.com/users/vladikoff/followers","following_url":"https://api.github.com/users/vladikoff/following{/other_user}","gists_url":"https://api.github.com/users/vladikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/vladikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladikoff/subscriptions","organizations_url":"https://api.github.com/users/vladikoff/orgs","repos_url":"https://api.github.com/users/vladikoff/repos","events_url":"https://api.github.com/users/vladikoff/events{/privacy}","received_events_url":"https://api.github.com/users/vladikoff/received_events","type":"User","site_admin":false},"repo":{"id":29302882,"name":"fxa-relier-client","full_name":"vladikoff/fxa-relier-client","owner":{"login":"vladikoff","id":128755,"avatar_url":"https://avatars.githubusercontent.com/u/128755?v=3","gravatar_id":"","url":"https://api.github.com/users/vladikoff","html_url":"https://github.com/vladikoff","followers_url":"https://api.github.com/users/vladikoff/followers","following_url":"https://api.github.com/users/vladikoff/following{/other_user}","gists_url":"https://api.github.com/users/vladikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/vladikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladikoff/subscriptions","organizations_url":"https://api.github.com/users/vladikoff/orgs","repos_url":"https://api.github.com/users/vladikoff/repos","events_url":"https://api.github.com/users/vladikoff/events{/privacy}","received_events_url":"https://api.github.com/users/vladikoff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vladikoff/fxa-relier-client","description":"Client JS library for FxA reliers","fork":true,"url":"https://api.github.com/repos/vladikoff/fxa-relier-client","forks_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/forks","keys_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/teams","hooks_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/hooks","issue_events_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/issues/events{/number}","events_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/events","assignees_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/assignees{/user}","branches_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/branches{/branch}","tags_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/tags","blobs_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/statuses/{sha}","languages_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/languages","stargazers_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/stargazers","contributors_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/contributors","subscribers_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/subscribers","subscription_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/subscription","commits_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/contents/{+path}","compare_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/merges","archive_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/downloads","issues_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/issues{/number}","pulls_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/pulls{/number}","milestones_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/milestones{/number}","notifications_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/labels{/name}","releases_url":"https://api.github.com/repos/vladikoff/fxa-relier-client/releases{/id}","created_at":"2015-01-15T15:11:10Z","updated_at":"2015-04-28T18:14:22Z","pushed_at":"2015-04-28T18:14:22Z","git_url":"git://github.com/vladikoff/fxa-relier-client.git","ssh_url":"git@github.com:vladikoff/fxa-relier-client.git","clone_url":"https://github.com/vladikoff/fxa-relier-client.git","svn_url":"https://github.com/vladikoff/fxa-relier-client","homepage":null,"size":588,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"770d17876aa687057b1577e9b678c93197d4c2cb","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":26180626,"name":"fxa-relier-client","full_name":"mozilla/fxa-relier-client","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/fxa-relier-client","description":"Firefox Accounts relier JavaScript library","fork":false,"url":"https://api.github.com/repos/mozilla/fxa-relier-client","forks_url":"https://api.github.com/repos/mozilla/fxa-relier-client/forks","keys_url":"https://api.github.com/repos/mozilla/fxa-relier-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/fxa-relier-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/fxa-relier-client/teams","hooks_url":"https://api.github.com/repos/mozilla/fxa-relier-client/hooks","issue_events_url":"https://api.github.com/repos/mozilla/fxa-relier-client/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/fxa-relier-client/events","assignees_url":"https://api.github.com/repos/mozilla/fxa-relier-client/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/fxa-relier-client/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/fxa-relier-client/tags","blobs_url":"https://api.github.com/repos/mozilla/fxa-relier-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/fxa-relier-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/fxa-relier-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/fxa-relier-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/fxa-relier-client/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/fxa-relier-client/languages","stargazers_url":"https://api.github.com/repos/mozilla/fxa-relier-client/stargazers","contributors_url":"https://api.github.com/repos/mozilla/fxa-relier-client/contributors","subscribers_url":"https://api.github.com/repos/mozilla/fxa-relier-client/subscribers","subscription_url":"https://api.github.com/repos/mozilla/fxa-relier-client/subscription","commits_url":"https://api.github.com/repos/mozilla/fxa-relier-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/fxa-relier-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/fxa-relier-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/fxa-relier-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/fxa-relier-client/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/fxa-relier-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/fxa-relier-client/merges","archive_url":"https://api.github.com/repos/mozilla/fxa-relier-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/fxa-relier-client/downloads","issues_url":"https://api.github.com/repos/mozilla/fxa-relier-client/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/fxa-relier-client/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/fxa-relier-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/fxa-relier-client/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/fxa-relier-client/releases{/id}","created_at":"2014-11-04T17:40:39Z","updated_at":"2015-03-12T15:46:04Z","pushed_at":"2015-04-28T17:59:33Z","git_url":"git://github.com/mozilla/fxa-relier-client.git","ssh_url":"git@github.com:mozilla/fxa-relier-client.git","clone_url":"https://github.com/mozilla/fxa-relier-client.git","svn_url":"https://github.com/mozilla/fxa-relier-client","homepage":"","size":1402,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":18,"forks":2,"open_issues":18,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/56"},"html":{"href":"https://github.com/mozilla/fxa-relier-client/pull/56"},"issue":{"href":"https://api.github.com/repos/mozilla/fxa-relier-client/issues/56"},"comments":{"href":"https://api.github.com/repos/mozilla/fxa-relier-client/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/fxa-relier-client/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/fxa-relier-client/statuses/d0967ccd97dbe7e2debec1f931b7550dfe320276"}}}}