Fix status route test paths
- Update test paths from /api/status/status to /api/status - Matches the route change from /status to / in status.js
This commit is contained in:
@@ -559,13 +559,13 @@ describe('GET /api/dashboard/user-downloads', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// GET /api/status/status
|
// GET /api/status
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
describe('GET /api/status/status', () => {
|
describe('GET /api/status', () => {
|
||||||
it('returns 401 when not authenticated', async () => {
|
it('returns 401 when not authenticated', async () => {
|
||||||
const app = createApp({ skipRateLimits: true });
|
const app = createApp({ skipRateLimits: true });
|
||||||
const res = await request(app).get('/api/status/status');
|
const res = await request(app).get('/api/status');
|
||||||
expect(res.status).toBe(401);
|
expect(res.status).toBe(401);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -578,7 +578,7 @@ describe('GET /api/status/status', () => {
|
|||||||
nock(RADARR_BASE).get('/api/v3/notification').reply(200, []);
|
nock(RADARR_BASE).get('/api/v3/notification').reply(200, []);
|
||||||
|
|
||||||
const res = await request(app)
|
const res = await request(app)
|
||||||
.get('/api/status/status')
|
.get('/api/status')
|
||||||
.set('Cookie', cookies);
|
.set('Cookie', cookies);
|
||||||
expect(res.status).toBe(403);
|
expect(res.status).toBe(403);
|
||||||
expect(res.body.error).toMatch(/admin/i);
|
expect(res.body.error).toMatch(/admin/i);
|
||||||
@@ -592,7 +592,7 @@ describe('GET /api/status/status', () => {
|
|||||||
nock(RADARR_BASE).get('/api/v3/notification').reply(200, []);
|
nock(RADARR_BASE).get('/api/v3/notification').reply(200, []);
|
||||||
|
|
||||||
const res = await request(app)
|
const res = await request(app)
|
||||||
.get('/api/status/status')
|
.get('/api/status')
|
||||||
.set('Cookie', cookies);
|
.set('Cookie', cookies);
|
||||||
expect(res.status).toBe(200);
|
expect(res.status).toBe(200);
|
||||||
expect(res.body.server).toBeDefined();
|
expect(res.body.server).toBeDefined();
|
||||||
@@ -611,7 +611,7 @@ describe('GET /api/status/status', () => {
|
|||||||
nock(RADARR_BASE).get('/api/v3/notification').replyWithError('connection refused');
|
nock(RADARR_BASE).get('/api/v3/notification').replyWithError('connection refused');
|
||||||
|
|
||||||
const res = await request(app)
|
const res = await request(app)
|
||||||
.get('/api/status/status')
|
.get('/api/status')
|
||||||
.set('Cookie', cookies);
|
.set('Cookie', cookies);
|
||||||
expect(res.status).toBe(200);
|
expect(res.status).toBe(200);
|
||||||
expect(res.body.webhooks.sonarr).toBeNull();
|
expect(res.body.webhooks.sonarr).toBeNull();
|
||||||
@@ -628,7 +628,7 @@ describe('GET /api/status/status', () => {
|
|||||||
nock(RADARR_BASE).get('/api/v3/notification').reply(200, []);
|
nock(RADARR_BASE).get('/api/v3/notification').reply(200, []);
|
||||||
|
|
||||||
const res = await request(app)
|
const res = await request(app)
|
||||||
.get('/api/status/status')
|
.get('/api/status')
|
||||||
.set('Cookie', cookies);
|
.set('Cookie', cookies);
|
||||||
expect(res.status).toBe(200);
|
expect(res.status).toBe(200);
|
||||||
expect(res.body.webhooks.sonarr).toBeDefined();
|
expect(res.body.webhooks.sonarr).toBeDefined();
|
||||||
|
|||||||
Reference in New Issue
Block a user