fix(SW-1710): use access object references instead

correct incorrect test that granted access incorrectly
This commit is contained in:
Christian Andolf
2025-03-07 14:22:33 +01:00
parent b0df70e552
commit af08b3277d
4 changed files with 24 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ import { describe, expect, it } from "@jest/globals"
import accessBooking, {
ACCESS_GRANTED,
ERROR_BAD_REQUEST,
ERROR_FORBIDDEN,
ERROR_NOT_FOUND,
ERROR_UNAUTHORIZED,
} from "./accessBooking"
@@ -42,7 +43,7 @@ describe("Access booking", () => {
email: "logged-out@scandichotels.com",
}).toString()
expect(accessBooking(loggedOut, "Booking", user, cookieString)).toBe(
ACCESS_GRANTED
ERROR_FORBIDDEN
)
})
it("should prompt for more if first name is missing", () => {