Fix support tests
This commit is contained in:
@@ -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`)
|
||||
|
||||
Reference in New Issue
Block a user