fix tests

This commit is contained in:
Girish Ramakrishnan
2025-09-13 14:51:30 +02:00
parent 045187fe2d
commit 43cc91aca2
7 changed files with 28 additions and 12 deletions
+9 -1
View File
@@ -122,15 +122,21 @@ describe('Provision', function () {
});
describe('Activation', function () {
let scope1;
let scope1, scope2;
before(async function () {
scope1 = nock(await appstore.getApiServerOrigin())
.post('/api/v1/register_cloudron3', (body) => typeof body.domain === 'string' && typeof body.version === 'string')
.times(1000)
.reply(201, { cloudronId: '32', cloudronToken: 'xx' });
scope2 = nock(await appstore.getApiServerOrigin())
.post('/api/v1/update_cloudron?accessToken=xx', (body) => typeof body.domain === 'string' && typeof body.version === 'string')
.times(1000)
.reply(200, {});
});
after(function () {
scope1.persist(false);
scope2.persist(false);
nock.cleanAll();
});
@@ -163,6 +169,8 @@ describe('Provision', function () {
.send({ username: '', password: owner.password, email: owner.email })
.ok(() => true);
console.log(response.body);
expect(response.status).to.eql(400);
});