1
0
Fork 0
mirror of synced 2024-06-13 16:05:06 +12:00

Update license activate test

I have removed the end of the test which was to 'Verify user downgraded to free license'
- This is not needed

I have also updated getLicenseKey - specifically how it handles the expected 200 response
This commit is contained in:
Mitch-Budibase 2023-10-06 16:22:56 +01:00
parent 5e16d04519
commit f3234f6bd6
2 changed files with 1 additions and 8 deletions

View file

@ -68,7 +68,7 @@ export default class LicenseAPI extends BaseAPI {
opts: { status?: number } = {}
): Promise<[Response, GetLicenseKeyResponse]> {
const [response, json] = await this.client.get(`/api/license/key`)
expect(response.status).toBe(opts.status ? opts.status : 200)
expect(response.status).toBe(opts.status || 200)
return [response, json]
}
async activateLicense(

View file

@ -64,12 +64,5 @@ describe("license activation", () => {
// Verify license key not found
await config.internalApi.license.getLicenseKey({ status: 404 })
// Verify user downgraded to free license
await config.doInNewState(async () => {
await config.loginAsAccount(createAccountRequest)
const [selfRes, body] = await config.api.accounts.self()
expect(body.license.plan.type).toBe("free")
})
})
})