Skip to content

Commit

Permalink
Merge pull request #226 from adhocteam/js-fix-be-tests
Browse files Browse the repository at this point in the history
File upload test shouldn't error out
  • Loading branch information
jasalisbury authored Mar 11, 2021
2 parents 0c44259 + de255ce commit 9369bd5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/routes/files/handlers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ describe('File Upload', () => {
});

describe('File Upload Handlers happy path', () => {
beforeEach(() => {
beforeEach(async () => {
uploadFile.mockReset();
getPresignedURL.mockReset();
});
it('tests a file upload', async () => {
ActivityReportPolicy.mockImplementation(() => ({
canUpdate: () => true,
}));
Expand All @@ -96,8 +94,10 @@ describe('File Upload', () => {
.expect(200)
.then((res) => {
fileId = res.body.id;
expect(uploadFile).toHaveBeenCalled();
});
});
it('tests a file upload', async () => {
expect(uploadFile).toHaveBeenCalled();
expect(mockAddToScanQueue).toHaveBeenCalled();
});
it('checks the metadata was uploaded to the database', async () => {
Expand Down

0 comments on commit 9369bd5

Please sign in to comment.