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:
parent
5e16d04519
commit
f3234f6bd6
|
@ -68,7 +68,7 @@ export default class LicenseAPI extends BaseAPI {
|
||||||
opts: { status?: number } = {}
|
opts: { status?: number } = {}
|
||||||
): Promise<[Response, GetLicenseKeyResponse]> {
|
): Promise<[Response, GetLicenseKeyResponse]> {
|
||||||
const [response, json] = await this.client.get(`/api/license/key`)
|
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]
|
return [response, json]
|
||||||
}
|
}
|
||||||
async activateLicense(
|
async activateLicense(
|
||||||
|
|
|
@ -64,12 +64,5 @@ describe("license activation", () => {
|
||||||
|
|
||||||
// Verify license key not found
|
// Verify license key not found
|
||||||
await config.internalApi.license.getLicenseKey({ status: 404 })
|
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")
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue