1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 15:59:25 +00:00

Add ability to extract creator Account from TestTemplate

This commit is contained in:
2022-02-25 19:52:45 +00:00
parent 67e34e2c93
commit 7f6b1cfb97

View File

@@ -19,6 +19,12 @@ class TestTemplate {
*/
accountId;
/**
* The account that created it
* @type {Account}
*/
account;
/**
* The name of the test template
* @type {string}
@@ -59,10 +65,16 @@ class TestTemplate {
for (const [ k, v ] of Object.entries(record[0]))
this[k] = v;
this.account = await this.getAccount();
return this;
})();
}
async getAccount() {
return new (require('./Account'))(this.accountId);
}
assignClass() {
}