feat(session): Pass `options.type` to recoveryEmailResendCode (#266), r=@philbooth
This commit is contained in:
Родитель
5ff439433c
Коммит
8984e25dec
|
@ -363,6 +363,9 @@ define([
|
|||
* Opaque url-encoded string that will be included in the verification link
|
||||
* as a querystring parameter, useful for continuing an OAuth flow for
|
||||
* example.
|
||||
* @param {String} [options.type]
|
||||
* Specifies the type of code to send, currently only supported type is
|
||||
* `upgradeSession`.
|
||||
* @param {String} [options.lang]
|
||||
* set the language for the 'Accept-Language' header
|
||||
* @return {Promise} A promise that will be fulfilled with JSON `xhr.responseText` of the request
|
||||
|
@ -393,6 +396,10 @@ define([
|
|||
data.resume = options.resume;
|
||||
}
|
||||
|
||||
if (options.type) {
|
||||
data.type = options.type;
|
||||
}
|
||||
|
||||
if (options.lang) {
|
||||
requestOpts.headers = {
|
||||
'Accept-Language': options.lang
|
||||
|
|
|
@ -50,12 +50,13 @@ define([
|
|||
);
|
||||
});
|
||||
|
||||
test('#recoveryEmailResendCode with service, redirectTo, and resume', function () {
|
||||
test('#recoveryEmailResendCode with service, redirectTo, type, and resume', function () {
|
||||
var user;
|
||||
var opts = {
|
||||
service: 'sync',
|
||||
redirectTo: 'https://sync.firefox.com/after_reset',
|
||||
resume: 'resumejwt'
|
||||
resume: 'resumejwt',
|
||||
type: 'upgradeSession'
|
||||
};
|
||||
|
||||
return accountHelper.newUnverifiedAccount()
|
||||
|
|
Загрузка…
Ссылка в новой задаче