Skip to content

Commit e7f2995

Browse files
Arthur Cinaderflovilmart
authored andcommitted
Adjust a test for change to logging. (#3452)
1 parent d5940b1 commit e7f2995

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

spec/FilesController.spec.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,15 @@ describe("FilesController",() =>{
5050
)
5151
.then(() => logController.getLogs({ from: Date.now() - 500, size: 1000 }))
5252
.then((logs) => {
53-
const log = logs.pop();
54-
expect(log.level).toBe('error');
55-
expect(log.code).toBe(130);
56-
expect(log.message).toBe('Could not store file.');
53+
// we get two logs here: 1. the source of the failure to save the file
54+
// and 2 the message that will be sent back to the client.
55+
const log1 = logs.pop();
56+
expect(log1.level).toBe('error');
57+
expect(log1.message).toBe('it failed');
58+
const log2 = logs.pop();
59+
expect(log2.level).toBe('error');
60+
expect(log2.code).toBe(130);
61+
expect(log2.message).toBe('Could not store file.');
5762
done();
5863
});
5964
});

0 commit comments

Comments
 (0)