Test: add a second mock team

So that we can test complex sorts
This commit is contained in:
Joey Baker
2016-10-31 12:41:34 -07:00
parent 34e37217f1
commit e1b851f932
2 changed files with 19 additions and 11 deletions

View File

@ -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