mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 20:14:35 -04:00
Update API routes in private API E2E tests
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
4805c9c5c5
commit
9e2b9caca9
6 changed files with 149 additions and 226 deletions
|
@ -47,7 +47,7 @@ describe('Media', () => {
|
|||
|
||||
agent = request.agent(testSetup.app.getHttpServer());
|
||||
await agent
|
||||
.post('/auth/local/login')
|
||||
.post('/api/private/auth/local/login')
|
||||
.send({ username: 'hardcoded', password: 'test' })
|
||||
.expect(201);
|
||||
});
|
||||
|
@ -55,7 +55,7 @@ describe('Media', () => {
|
|||
describe('POST /media', () => {
|
||||
it('works', async () => {
|
||||
const uploadResponse = await agent
|
||||
.post('/media')
|
||||
.post('/api/private/media')
|
||||
.attach('file', 'test/private-api/fixtures/test.png')
|
||||
.set('HedgeDoc-Note', 'test_upload_media')
|
||||
.expect('Content-Type', /json/)
|
||||
|
@ -75,7 +75,7 @@ describe('Media', () => {
|
|||
});
|
||||
it('MIME type not supported', async () => {
|
||||
await agent
|
||||
.post('/media')
|
||||
.post('/api/private/media')
|
||||
.attach('file', 'test/private-api/fixtures/test.zip')
|
||||
.set('HedgeDoc-Note', 'test_upload_media')
|
||||
.expect(400);
|
||||
|
@ -83,7 +83,7 @@ describe('Media', () => {
|
|||
});
|
||||
it('note does not exist', async () => {
|
||||
await agent
|
||||
.post('/media')
|
||||
.post('/api/private/media')
|
||||
.attach('file', 'test/private-api/fixtures/test.zip')
|
||||
.set('HedgeDoc-Note', 'i_dont_exist')
|
||||
.expect(400);
|
||||
|
@ -94,7 +94,7 @@ describe('Media', () => {
|
|||
mode: '444',
|
||||
});
|
||||
await agent
|
||||
.post('/media')
|
||||
.post('/api/private/media')
|
||||
.attach('file', 'test/private-api/fixtures/test.png')
|
||||
.set('HedgeDoc-Note', 'test_upload_media')
|
||||
.expect('Content-Type', /json/)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue