Fixing issue where database wasn't accessible in authorized test.
This commit is contained in:
parent
bf4a8737f0
commit
9b8df32c52
|
@ -10,6 +10,7 @@ jest.mock("../../environment", () => ({
|
||||||
const authorizedMiddleware = require("../authorized")
|
const authorizedMiddleware = require("../authorized")
|
||||||
const env = require("../../environment")
|
const env = require("../../environment")
|
||||||
const { PermissionTypes, PermissionLevels } = require("@budibase/auth/permissions")
|
const { PermissionTypes, PermissionLevels } = require("@budibase/auth/permissions")
|
||||||
|
require("@budibase/auth").init(require("../../db"))
|
||||||
|
|
||||||
class TestConfiguration {
|
class TestConfiguration {
|
||||||
constructor(role) {
|
constructor(role) {
|
||||||
|
@ -21,6 +22,7 @@ class TestConfiguration {
|
||||||
request: {
|
request: {
|
||||||
url: ""
|
url: ""
|
||||||
},
|
},
|
||||||
|
appId: "",
|
||||||
auth: {},
|
auth: {},
|
||||||
next: this.next,
|
next: this.next,
|
||||||
throw: this.throw
|
throw: this.throw
|
||||||
|
|
Loading…
Reference in New Issue