0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 14:12:40 +00:00

Fix spec tests

This commit is contained in:
Trevor Buckner
2023-07-06 00:19:23 -04:00
parent 6344eaa17d
commit a4584dc78e

View File

@@ -111,15 +111,26 @@ describe('Tests for api', ()=>{
expect(googleId).toEqual('12345');
});
it('should return id and google id from params', ()=>{
it('should return 12-char id and google id from params', ()=>{
const { id, googleId } = api.getId({
params : {
id : '123456789012abcdefghijkl'
id : '123456789012345678901234567890123abcdefghijkl'
}
});
expect(googleId).toEqual('123456789012345678901234567890123');
expect(id).toEqual('abcdefghijkl');
expect(googleId).toEqual('123456789012');
});
it('should return 10-char id and google id from params', ()=>{
const { id, googleId } = api.getId({
params : {
id : '123456789012345678901234567890123abcdefghij'
}
});
expect(googleId).toEqual('123456789012345678901234567890123');
expect(id).toEqual('abcdefghij');
});
});