mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 20:59:30 +00:00
Add ability to extract creator Account from TestTemplate
This commit is contained in:
@@ -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() {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user