mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
parent
8ddf83f3c5
commit
635580f291
1 changed files with 5 additions and 5 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue