fix(traceback): add mock for summary logs in tests (#314) r=@vladikoff
Fixes #203 : Added mocks for the log to not output the summary of a 500 for the successful tests.
This commit is contained in:
Родитель
5050602f6e
Коммит
39b4ab2ae8
12
test/api.js
12
test/api.js
|
@ -203,6 +203,18 @@ describe('/profile', function() {
|
|||
&& rec.args[1].code === 400;
|
||||
});
|
||||
|
||||
mock.log('server', function(rec) {
|
||||
return rec.levelname === 'ERROR'
|
||||
&& rec.args[0] === 'summary'
|
||||
&& rec.args[1].path === '/v1/_core_profile';
|
||||
});
|
||||
|
||||
mock.log('server', function(rec) {
|
||||
return rec.levelname === 'ERROR'
|
||||
&& rec.args[0] === 'summary'
|
||||
&& rec.args[1].path === '/v1/profile';
|
||||
});
|
||||
|
||||
return Server.api.get({
|
||||
url: '/profile',
|
||||
headers: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче