This commit is contained in:
Mitch-Budibase 2023-10-05 17:43:25 +01:00
parent 678033cc8b
commit 5e16d04519
6 changed files with 201 additions and 200 deletions

View File

@ -15,6 +15,6 @@ export default class AccountInternalAPI {
this.auth = new AuthAPI(this.client)
this.accounts = new AccountAPI(this.client)
this.licenses = new LicenseAPI(this.client)
this.stripe = new StripeAPI((this.client))
this.stripe = new StripeAPI(this.client)
}
}

View File

@ -25,14 +25,15 @@ describe("license activation", () => {
hosting: Hosting.SELF,
})
const [createAccountRes, account] =
await config.accountsApi.accounts.create(createAccountRequest, { autoVerify: true })
await config.accountsApi.accounts.create(createAccountRequest, {
autoVerify: true,
})
let licenseKey: string = " "
await config.doInNewState(async () => {
await config.loginAsAccount(createAccountRequest)
// Retrieve license key
const [res, body] =
await config.accountsApi.licenses.getLicenseKey()
const [res, body] = await config.accountsApi.licenses.getLicenseKey()
licenseKey = body.licenseKey
})
@ -49,7 +50,7 @@ describe("license activation", () => {
)
// Activate license key
await config.internalApi.license.activateLicenseKey({licenseKey})
await config.internalApi.license.activateLicenseKey({ licenseKey })
// Verify license updated with new feature
await config.doInNewState(async () => {