Test: add a second mock team
So that we can test complex sorts
This commit is contained in:
@ -58,11 +58,13 @@ export default (test) => {
|
||||
const { Player, Team, City } = t.context.sequelize.models;
|
||||
const city1 = await City.create({ name: 'Healdsburg' });
|
||||
const team1 = await Team.create({ name: 'Baseballs', cityId: city1.id });
|
||||
const team2 = await Team.create({ name: 'Footballs', cityId: city1.id });
|
||||
const player1 = await Player.create({
|
||||
name: 'Pinot', teamId: team1.id, active: true,
|
||||
name: 'Cat', teamId: team1.id, active: true,
|
||||
});
|
||||
const player2 = await Player.create({ name: 'Syrah', teamId: team1.id });
|
||||
t.context.instances = { city1, team1, player1, player2 };
|
||||
const player2 = await Player.create({ name: 'Pinot', teamId: team1.id });
|
||||
const player3 = await Player.create({ name: 'Syrah', teamId: team2.id });
|
||||
t.context.instances = { city1, team1, team2, player1, player2, player3 };
|
||||
});
|
||||
|
||||
// kill the server so that we can exit and don't leak memory
|
||||
|
Reference in New Issue
Block a user