0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fixed "no-shadow" linting in a test suite

refs 1439219
This commit is contained in:
Naz 2020-10-20 13:19:33 +13:00
parent 8ddf83f3c5
commit 635580f291

View file

@ -90,9 +90,9 @@ describe('User Model', function run() {
it('can find gravatar', function (done) { it('can find gravatar', function (done) {
const userData = testUtils.DataGenerator.forModel.users[4]; const userData = testUtils.DataGenerator.forModel.users[4];
sinon.stub(imageLib.gravatar, 'lookup').callsFake(function (userData) { sinon.stub(imageLib.gravatar, 'lookup').callsFake(function (data) {
userData.image = 'http://www.gravatar.com/avatar/2fab21a4c4ed88e76add10650c73bae1?d=404'; data.image = 'http://www.gravatar.com/avatar/2fab21a4c4ed88e76add10650c73bae1?d=404';
return Promise.resolve(userData); return Promise.resolve(data);
}); });
UserModel.add(userData, context).then(function (createdUser) { UserModel.add(userData, context).then(function (createdUser) {
@ -107,8 +107,8 @@ describe('User Model', function run() {
it('can handle no gravatar', function (done) { it('can handle no gravatar', function (done) {
const userData = testUtils.DataGenerator.forModel.users[0]; const userData = testUtils.DataGenerator.forModel.users[0];
sinon.stub(imageLib.gravatar, 'lookup').callsFake(function (userData) { sinon.stub(imageLib.gravatar, 'lookup').callsFake(function (data) {
return Promise.resolve(userData); return Promise.resolve(data);
}); });
UserModel.add(userData, context).then(function (createdUser) { UserModel.add(userData, context).then(function (createdUser) {