Skip to content

Commit

Permalink
Removed wrong test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Mario committed Apr 27, 2024
1 parent c77a5cc commit c799b3d
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions gatewayservice/gateway-service.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,23 +258,4 @@ describe('Gateway Service without mocked micro services', () => {
expect(error.response.data.error).toBe('Invalid username or password');
}
});

it('should not forward any url and give 500', async () => {
const urls = ['/adduser', '/forgetPassword', '/changePassword', '/questions',
'/questions/es/1/CAPITAL', '/questions/es/1', '/questions/es',
'/record', '/record/ranking/top10', '/record/ranking/user',
'/record/user']
urls.forEach(async (url) => {
try{
await request(app)
.post(url)
.send({ username: 'testuser', password: 'testpassword' });

} catch(error){
expect(error.response.status).toBe(500);
expect(error.response.data.error).toBe('Internal server error');
}
})

})
});

0 comments on commit c799b3d

Please sign in to comment.