feat: Apply authentication middleware globally (#7396)
* feat: Apply auth middleware globally * feat: Remove local auth middleware where it makes sense
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
import { medusaIntegrationTestRunner } from "medusa-test-utils/dist"
|
||||
import {
|
||||
adminHeaders,
|
||||
createAdminUser,
|
||||
} from "../../../helpers/create-admin-user"
|
||||
|
||||
jest.setTimeout(50000)
|
||||
|
||||
@@ -14,8 +18,15 @@ medusaIntegrationTestRunner({
|
||||
appContainer = getContainer()
|
||||
})
|
||||
|
||||
beforeEach(async () => {
|
||||
await createAdminUser(dbConnection, adminHeaders, appContainer)
|
||||
})
|
||||
|
||||
it("should list payment providers", async () => {
|
||||
let response = await api.get(`/admin/payments/payment-providers`)
|
||||
let response = await api.get(
|
||||
`/admin/payments/payment-providers`,
|
||||
adminHeaders
|
||||
)
|
||||
|
||||
expect(response.status).toEqual(200)
|
||||
expect(response.data.payment_providers).toEqual([
|
||||
|
||||
Reference in New Issue
Block a user