diff --git a/core/test/utils/index.js b/core/test/utils/index.js index 386952d89a..4c74f251a0 100644 --- a/core/test/utils/index.js +++ b/core/test/utils/index.js @@ -550,6 +550,10 @@ login = function login(request) { client_id: 'ghost-admin', client_secret: 'not_available' }).then(function then(res) { + if (res.statusCode !== 200) { + return reject(res.body); + } + resolve(res.body.access_token); }, reject); });