Files
threshold-ui/addons/api/mirage/factories/host-catalog.js
T

14 lines
397 B
JavaScript
Raw Normal View History

2020-06-04 16:53:37 -04:00
import factory from '../generated/factories/host-catalog';
import { trait } from 'ember-cli-mirage';
2020-06-04 16:53:37 -04:00
export default factory.extend({
withChildren: trait({
afterCreate(hostCatalog, server) {
const { scope } = hostCatalog;
const hosts = server.createList('host', 10, { scope, hostCatalog });
server.createList('host-set', 3, { scope, hostCatalog, hosts });
}
})
});