From 9bfa3e5c1107ba50a1b317a33b328799925df546 Mon Sep 17 00:00:00 2001 From: Matheus de Almeida <69125506+matheusmra@users.noreply.github.com> Date: Sat, 9 May 2026 19:32:18 -0300 Subject: [PATCH 1/3] Update app.js --- src/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.js b/src/app.js index af42e6e..104e67d 100644 --- a/src/app.js +++ b/src/app.js @@ -12,7 +12,7 @@ app.get('/status', (req, res) => { app.get('/users', async (req, res) => { const users = await prisma.user.findMany(); - res.status(200).json(users); + res.status(200).json(users) }); -module.exports = app; \ No newline at end of file +module.exports = app; From afd1139bff2e68c66ddc3f5d8c6b23d824e16447 Mon Sep 17 00:00:00 2001 From: Matheus de Almeida <69125506+matheusmra@users.noreply.github.com> Date: Sat, 9 May 2026 19:36:00 -0300 Subject: [PATCH 2/3] Update app.js --- src/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index 104e67d..d2d28fd 100644 --- a/src/app.js +++ b/src/app.js @@ -12,7 +12,7 @@ app.get('/status', (req, res) => { app.get('/users', async (req, res) => { const users = await prisma.user.findMany(); - res.status(200).json(users) + res.status(200).json(users); }); module.exports = app; From 93bcef03b85bf3803066ae3c1e1b628db784090f Mon Sep 17 00:00:00 2001 From: Matheus de Almeida <69125506+matheusmra@users.noreply.github.com> Date: Sat, 9 May 2026 19:42:29 -0300 Subject: [PATCH 3/3] Change expected status code from 200 to 500 --- tests/app.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/app.test.js b/tests/app.test.js index 1b0111d..3af5ec6 100644 --- a/tests/app.test.js +++ b/tests/app.test.js @@ -4,7 +4,7 @@ const app = require('../src/app'); describe('API Status', () => { it('Deve retornar 200 na rota de status', async () => { const response = await request(app).get('/status'); - expect(response.statusCode).toBe(200); + expect(response.statusCode).toBe(500); expect(response.body.status).toBe('API Online e CI/CD configurado!'); }); -}); \ No newline at end of file +});