Skip to content

Commit b63b18c

Browse files
committed
mirage: Add team factory
1 parent bbb0c7d commit b63b18c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

mirage/factories/team.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Factory } from 'ember-cli-mirage';
2+
3+
const ORGS = ['rust-lang', 'emberjs', 'rust-random', 'georust', 'actix'];
4+
5+
export default Factory.extend({
6+
name: i => `team-${i + 1}`,
7+
8+
login(i) {
9+
return `github:${ORGS[i % ORGS.length]}:${this.name}`;
10+
},
11+
12+
url(i) {
13+
return `https://github.com/${ORGS[i % ORGS.length]}`;
14+
},
15+
16+
avatar: 'https://avatars1.githubusercontent.com/u/14631425?v=4',
17+
});

0 commit comments

Comments
 (0)