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

Migrated test to more readable syntax

no issue

- A bit of a cleanup before touching this test suite. The use of `done` in tests is soooo outdated
This commit is contained in:
Naz 2022-07-08 13:20:15 +02:00 committed by naz
parent 63f2cfdd32
commit 2956c1e88a

View file

@ -113,17 +113,11 @@ describe('User API', function () {
});
describe('Destroy', function () {
it('[failure] Destroy unknown user id', function (done) {
request.delete(localUtils.API.getApiQuery('users/' + ObjectId().toHexString()))
it('[failure] Destroy unknown user id', function () {
return request
.delete(localUtils.API.getApiQuery('users/' + ObjectId().toHexString()))
.set('Origin', config.get('url'))
.expect(404)
.end(function (err) {
if (err) {
return done(err);
}
done();
});
.expect(404);
});
});
});