Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions auth/__tests__/auth_unit_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const TIME_OUT = process.env.TEST_TIMEOUT ?? 5000

describe("auth0Middleware #auth_test", () => {
it(
"should return 400 without Authorization Header",
"should return 401 without Authorization Header",
async () => {
const res = await request(app).get("/protected-route")
expect(res.status).toBe(400)
expect(res.status).toBe(401)
},
TIME_OUT
)
Expand Down
8 changes: 4 additions & 4 deletions classes/User/__tests__/unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ describe("GET /my/profile #user_class", () => {
expect(response.body.userData).toEqual({name: "VOO"})
})

it("should return 400 if user is not authenticated (no authorization header)", async () => {
it("should return 401 if user is not authenticated (no authorization header)", async () => {
const appWithoutAuth = express()
appWithoutAuth.use("/my", privateProfileRouter)
const response = await request(appWithoutAuth).get("/my/profile")
expect(response.status).toBe(400)
expect(response.status).toBe(401)
})

it("should return 401 if user is not authenticated (invalid authorization header)", async () => {
Expand Down Expand Up @@ -138,11 +138,11 @@ describe("GET /my/projects #user_class", () => {
}
}
})
it("should return 400 if user is not authenticated (no authorization header)", async () => {
it("should return 401 if user is not authenticated (no authorization header)", async () => {
const appWithoutAuth = express()
appWithoutAuth.use("/my", privateProfileRouter)
const response = await request(appWithoutAuth).get("/my/profile")
expect(response.status).toBe(400)
expect(response.status).toBe(401)
})

it("should return 401 if user is not authenticated (invalid authorization header)", async () => {
Expand Down
2 changes: 1 addition & 1 deletion database/maria/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* https://github.com/thehabes
*/

import mariadb from 'mariadb'
import * as mariadb from 'mariadb'

class DatabaseController {
constructor(connect=false) {
Expand Down
Loading
Loading