Fix support tests

This commit is contained in:
Girish Ramakrishnan
2023-12-03 20:00:57 +01:00
parent 344578006c
commit 8e28d2a5aa
3 changed files with 2 additions and 55 deletions
-28
View File
@@ -83,34 +83,6 @@ describe('Support API', function () {
});
});
describe('config', function () {
it('normal user cannot get config', async function () {
const response = await superagent.get(`${serverUrl}/api/v1/support/config`)
.query({ access_token: user.token })
.ok(() => true);
expect(response.statusCode).to.equal(403);
});
it('admin also cannot get config', async function () {
const response = await superagent.get(`${serverUrl}/api/v1/support/config`)
.query({ access_token: admin.token })
.ok(() => true);
expect(response.statusCode).to.equal(403);
});
it('owner can get config', async function () {
const response = await superagent.get(`${serverUrl}/api/v1/support/config`)
.query({ access_token: owner.token });
expect(response.statusCode).to.equal(200);
expect(response.body.email).to.be('support@cloudron.io');
expect(response.body.remoteSupport).to.be(true);
expect(response.body.submitTickets).to.be(true);
});
});
describe('ticket', function () {
it('fails without token', async function () {
const response = await superagent.post(`${serverUrl}/api/v1/support/ticket`)