From f20378f6c8b52912922e3f4143e10508ef9c1565 Mon Sep 17 00:00:00 2001 From: Evan Powell Date: Sun, 8 Nov 2020 21:09:44 -0600 Subject: [PATCH] updated the tests, uncertain about their effectiveness ATM --- test/backend/models_Lineup.spec.js | 6 +++++- test/backend/models_Matchup.spec.js | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/test/backend/models_Lineup.spec.js b/test/backend/models_Lineup.spec.js index 2ddaba9..11d8799 100644 --- a/test/backend/models_Lineup.spec.js +++ b/test/backend/models_Lineup.spec.js @@ -21,7 +21,11 @@ describe('the lineup model', function() { week_num: '6', }) expect(await lineup.to_api()).to.be.eql({ - //? + //not absolutely sure about this one + team_id: undefined, + active: undefined, + //not surea bout above, either + week_num: 5, }) }) }) \ No newline at end of file diff --git a/test/backend/models_Matchup.spec.js b/test/backend/models_Matchup.spec.js index aa16ad9..be83c63 100644 --- a/test/backend/models_Matchup.spec.js +++ b/test/backend/models_Matchup.spec.js @@ -18,9 +18,21 @@ describe('the matchup model', function() { home_team_score: 20, visitor_team_score: 21, }) + //I added one for every async function, hopefully that is the right call expect(await Matchup.to_api()).to.be.eql({ + home_team: 'home team', + visitor_team: 'visiting team', + }) + //uncertain for what to even put in these below + expect(await Matchup.home_team()).to.be.eql({ + home_team_id: 'test home team', + }) + expect(await Matchup.visitor_team()).to.be.eql({ + visitor_team_id: 'test vistor team', }) + + }) }) \ No newline at end of file