2019-09-26 18:47:07 +00:00
|
|
|
import { Factory } from 'ember-cli-mirage';
|
|
|
|
import faker from 'faker';
|
2017-10-14 18:01:28 +00:00
|
|
|
|
|
|
|
export default Factory.extend({
|
|
|
|
id: () => faker.hacker.verb(),
|
|
|
|
name() {
|
|
|
|
return this.id;
|
|
|
|
},
|
|
|
|
description: () => (Math.random() > 0.2 ? faker.lorem.sentence() : null),
|
|
|
|
rules: `
|
|
|
|
# Allow read only access to the default namespace
|
|
|
|
namespace "default" {
|
|
|
|
policy = "read"
|
|
|
|
}
|
|
|
|
|
|
|
|
node {
|
|
|
|
policy = "read"
|
|
|
|
}`,
|
|
|
|
});
|