-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from HackRU/feat-event-points
feat: implement points in attend-event
- Loading branch information
Showing
3 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ describe('Attend-Event tests', () => { | |
auth_token: 'mockToken', | ||
qr: '[email protected]', | ||
event: 'lunch', | ||
again: false, | ||
limit: 1, | ||
}; | ||
const path = '/attend-event'; | ||
const httpMethod = 'POST'; | ||
|
@@ -83,12 +83,13 @@ describe('Attend-Event tests', () => { | |
|
||
// case 4 | ||
it('user tries to check into an event the second time but it can only be attended once', async () => { | ||
userData.again = false; | ||
findOneMock | ||
.mockReturnValueOnce({ | ||
day_of: { | ||
event: { | ||
lunch: 1, | ||
lunch: { | ||
attend: 1, | ||
}, | ||
}, | ||
}, | ||
}) | ||
|
@@ -113,7 +114,6 @@ describe('Attend-Event tests', () => { | |
|
||
// case 5 | ||
it('success check-in to an event', async () => { | ||
userData.again = true; | ||
findOneMock | ||
.mockReturnValueOnce({ | ||
day_of: {}, | ||
|