mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -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();
|
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', () => {
|
it('fails if path is empty', () => {
|
||||||
const mockedRequest = Mock.of<IncomingMessage>({
|
const mockedRequest = Mock.of<IncomingMessage>({
|
||||||
url: '',
|
url: '',
|
||||||
|
|
Loading…
Reference in a new issue