This commit is contained in:
Shane Tomlinson 2017-11-08 11:10:07 +00:00
Родитель beb319045b a5d72e0b38
Коммит c982e6ab7b
4 изменённых файлов: 15 добавлений и 21 удалений

Просмотреть файл

@ -1,3 +1,13 @@
<a name="1.99.3"></a>
## 1.99.3 (2017-11-07)
### Bug Fixes
* **sms:** If SMS is enabled, always send a signinCode. (#5688) r=@vbudhram ([6b1617b](https://github.com/mozilla/fxa-content-server/commit/6b1617b))
<a name="1.99.2"></a>
## 1.99.2 (2017-11-07)

Просмотреть файл

@ -22,11 +22,8 @@ define((require, exports, module) => {
* @returns {String[]}
*/
getSmsFeatures () {
const features = [];
if (this.isInExperimentGroup('sendSms', 'signinCodes')) {
features.push('signinCodes');
}
return features;
// If SMS is enabled for a user, always send a signinCode.
return ['signinCodes'];
}
};
});

Просмотреть файл

@ -9,7 +9,6 @@ define(function (require, exports, module) {
const { assert } = require('chai');
const BaseView = require('views/base');
const Cocktail = require('cocktail');
const sinon = require('sinon');
const Template = require('stache!templates/test_template');
const SmsView = BaseView.extend({
@ -30,20 +29,8 @@ define(function (require, exports, module) {
});
});
describe('getSmsFeatures', () => {
describe('user in `signinCodes` experiment group', () => {
it('returns an array with `signinCodes`', () => {
sinon.stub(view, 'isInExperimentGroup').callsFake(() => true);
assert.isTrue(view.getSmsFeatures().indexOf('signinCodes') > -1);
});
});
describe('user not in `signinCodes` experiment group', () => {
it('returns an empty array', () => {
sinon.stub(view, 'isInExperimentGroup').callsFake(() => false);
assert.deepEqual(view.getSmsFeatures(), []);
});
});
it('getSmsFeatures returns an array with `signinCodes`', () => {
assert.isTrue(view.getSmsFeatures().indexOf('signinCodes') > -1);
});
});
});

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "fxa-content-server",
"version": "1.99.2",
"version": "1.99.3",
"description": "Firefox Accounts Content Server",
"scripts": {
"build-production": "grunt build",