0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00
This commit is contained in:
G.Ambatte
2023-06-25 14:39:42 +12:00
parent 782aa8e658
commit ffa240f78d

View File

@@ -125,7 +125,7 @@ describe('Tests for api', ()=>{
describe('getBrew', ()=>{
const toBrewPromise = (brew)=>new Promise((res)=>res({ toObject: ()=>brew }));
const notFoundError = 'Brew not found in Homebrewery database or Google Drive';
const notFoundError = { HBErrorCode: '04', message: 'Brew not found', name: 'BrewLoad Error', status: 404 };
it('returns middleware', ()=>{
const getFn = api.getBrew('share');
@@ -162,7 +162,7 @@ describe('Tests for api', ()=>{
err = e;
}
expect(err).toEqual({ 'message': notFoundError });
expect(err).toEqual(notFoundError);
expect(req.brew).toEqual({});
expect(next).not.toHaveBeenCalled();
expect(api.getId).toHaveBeenCalledWith(req);