Skip to content

Commit

Permalink
Eliminados los test de guardado de partidas
Browse files Browse the repository at this point in the history
  • Loading branch information
iyanfdezz committed Apr 1, 2024
1 parent ce33cee commit 4bedbdd
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 @@ -106,16 +106,6 @@ describe('Gateway Service', () => {
expect(response.body).toEqual({ userInfo: 'mockedUserInfo' });
});

// Test /saveGameList endpoint
it('should forward saveGameList request to user service', async () => {
const response = await request(app)
.post('/saveGameList')
.send({ username: 'testuser', gameMode: 'classic', gameData: { points: 100, correctAnswers: 8, incorrectAnswers: 2, avgTime: 30 } });

expect(response.statusCode).toBe(200);
expect(response.body).toEqual({ message: 'Partida guardada exitosamente' });
});

// Test /stats endpoint
it('should forward stats request to stats service', async () => {
const response = await request(app).get("/stats").query({ user: 'testuser', gamemode: 'classic' });
Expand All @@ -124,15 +114,6 @@ describe('Gateway Service', () => {
expect(response.body).toEqual({ stats: 'mockedStats' });
});

// Test /saveGame endpoint
it('should forward saveGame request to stats service', async () => {
const response = await request(app)
.post('/saveGame')
.send({ username: 'testuser', gameMode: 'classic', gameData: { points: 100, correctAnswers: 8, incorrectAnswers: 2, avgTime: 30 } });

// Write your test assertions here
});

// Test /ranking endpoint
it('should forward ranking request to stats service', async () => {
const response = await request(app).get("/ranking").query({ gamemode: 'classic', filterBy: 'all' });
Expand Down

0 comments on commit 4bedbdd

Please sign in to comment.