fix(tests): Fix account destroy device test (#2263), r=@rfk

This commit is contained in:
Vijay Budhram 2018-01-23 21:58:31 +00:00 коммит произвёл GitHub
Родитель e7bbb86de3
Коммит 220d57d45e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 4 удалений

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

@ -501,7 +501,7 @@ module.exports = (log, db, config, customs, push, devices) => {
const sessionToken = request.auth.credentials const sessionToken = request.auth.credentials
const uid = sessionToken.uid const uid = sessionToken.uid
const id = request.payload.id const id = request.payload.id
let result, devices let devices
// We want to inculde the disconnected device in the list // We want to inculde the disconnected device in the list
// of devices to notify, so list them before disconnecting. // of devices to notify, so list them before disconnecting.
@ -511,7 +511,6 @@ module.exports = (log, db, config, customs, push, devices) => {
return db.deleteDevice(uid, id) return db.deleteDevice(uid, id)
}) })
.then(res => { .then(res => {
result = res
push.notifyDeviceDisconnected(uid, devices, id) push.notifyDeviceDisconnected(uid, devices, id)
.catch(() => {}) .catch(() => {})
return P.all([ return P.all([
@ -526,8 +525,7 @@ module.exports = (log, db, config, customs, push, devices) => {
}) })
]) ])
}) })
.then(() => result) .then(() => reply({}), reply)
.then(reply, reply)
} }
} }
] ]