Adjust a test for change to logging. (#3452)
This commit is contained in:
committed by
Florent Vilmart
parent
d5940b17b6
commit
e7f2995143
@@ -50,10 +50,15 @@ describe("FilesController",() =>{
|
|||||||
)
|
)
|
||||||
.then(() => logController.getLogs({ from: Date.now() - 500, size: 1000 }))
|
.then(() => logController.getLogs({ from: Date.now() - 500, size: 1000 }))
|
||||||
.then((logs) => {
|
.then((logs) => {
|
||||||
const log = logs.pop();
|
// we get two logs here: 1. the source of the failure to save the file
|
||||||
expect(log.level).toBe('error');
|
// and 2 the message that will be sent back to the client.
|
||||||
expect(log.code).toBe(130);
|
const log1 = logs.pop();
|
||||||
expect(log.message).toBe('Could not store file.');
|
expect(log1.level).toBe('error');
|
||||||
|
expect(log1.message).toBe('it failed');
|
||||||
|
const log2 = logs.pop();
|
||||||
|
expect(log2.level).toBe('error');
|
||||||
|
expect(log2.code).toBe(130);
|
||||||
|
expect(log2.message).toBe('Could not store file.');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user