mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
Fails if note id is empty
Signed-off-by: Tamotsu Takahashi <ttakah+github@gmail.com>
This commit is contained in:
parent
be04b2d005
commit
5704ad9c3b
1 changed files with 7 additions and 0 deletions
|
@ -30,6 +30,13 @@ describe('extract note id from path', () => {
|
|||
expect(() => extractNoteIdFromRequestUrl(mockedRequest)).toThrow();
|
||||
});
|
||||
|
||||
it('fails if note id is empty', () => {
|
||||
const mockedRequest = Mock.of<IncomingMessage>({
|
||||
url: '/realtime?noteId=',
|
||||
});
|
||||
expect(() => extractNoteIdFromRequestUrl(mockedRequest)).toThrow();
|
||||
});
|
||||
|
||||
it('fails if path is empty', () => {
|
||||
const mockedRequest = Mock.of<IncomingMessage>({
|
||||
url: '',
|
||||
|
|
Loading…
Reference in a new issue