@@ -22,7 +22,7 @@ import { EventTypesRepositoryFixture } from "test/fixtures/repository/event-type
22
22
import { OAuthClientRepositoryFixture } from "test/fixtures/repository/oauth-client.repository.fixture" ;
23
23
import { TeamRepositoryFixture } from "test/fixtures/repository/team.repository.fixture" ;
24
24
import { UserRepositoryFixture } from "test/fixtures/repository/users.repository.fixture" ;
25
- import { withAccessTokenAuth } from "test/utils/withAccessTokenAuth " ;
25
+ import { withApiAuth } from "test/utils/withApiAuth " ;
26
26
27
27
import { SUCCESS_STATUS } from "@calcom/platform-constants" ;
28
28
import {
@@ -79,7 +79,7 @@ describe("Event types Endpoints", () => {
79
79
let user : User ;
80
80
81
81
beforeAll ( async ( ) => {
82
- const moduleRef = await withAccessTokenAuth (
82
+ const moduleRef = await withApiAuth (
83
83
userEmail ,
84
84
Test . createTestingModule ( {
85
85
providers : [ PrismaExceptionFilter , HttpExceptionFilter ] ,
@@ -288,7 +288,7 @@ describe("Event types Endpoints", () => {
288
288
it ( `/GET/:id` , async ( ) => {
289
289
const response = await request ( app . getHttpServer ( ) )
290
290
. get ( `/api/v2/event-types/${ eventType . id } ` )
291
- // note: bearer token value mocked using "withAccessTokenAuth " for user which id is used when creating event type above
291
+ // note: bearer token value mocked using "withApiAuth " for user which id is used when creating event type above
292
292
. set ( "Authorization" , `Bearer whatever` )
293
293
. expect ( 200 ) ;
294
294
@@ -305,7 +305,7 @@ describe("Event types Endpoints", () => {
305
305
it ( `/GET/:username/public` , async ( ) => {
306
306
const response = await request ( app . getHttpServer ( ) )
307
307
. get ( `/api/v2/event-types/${ username } /public` )
308
- // note: bearer token value mocked using "withAccessTokenAuth " for user which id is used when creating event type above
308
+ // note: bearer token value mocked using "withApiAuth " for user which id is used when creating event type above
309
309
. set ( "Authorization" , `Bearer whatever` )
310
310
. expect ( 200 ) ;
311
311
@@ -323,7 +323,7 @@ describe("Event types Endpoints", () => {
323
323
it ( `/GET/:username/:eventSlug/public` , async ( ) => {
324
324
const response = await request ( app . getHttpServer ( ) )
325
325
. get ( `/api/v2/event-types/${ username } /${ eventType . slug } /public` )
326
- // note: bearer token value mocked using "withAccessTokenAuth " for user which id is used when creating event type above
326
+ // note: bearer token value mocked using "withApiAuth " for user which id is used when creating event type above
327
327
. set ( "Authorization" , `Bearer whatever` )
328
328
. expect ( 200 ) ;
329
329
@@ -340,7 +340,7 @@ describe("Event types Endpoints", () => {
340
340
it ( `/GET/` , async ( ) => {
341
341
const response = await request ( app . getHttpServer ( ) )
342
342
. get ( `/api/v2/event-types` )
343
- // note: bearer token value mocked using "withAccessTokenAuth " for user which id is used when creating event type above
343
+ // note: bearer token value mocked using "withApiAuth " for user which id is used when creating event type above
344
344
. set ( "Authorization" , `Bearer whatever` )
345
345
. expect ( 200 ) ;
346
346
@@ -359,7 +359,7 @@ describe("Event types Endpoints", () => {
359
359
it ( `/GET/public/:username/` , async ( ) => {
360
360
const response = await request ( app . getHttpServer ( ) )
361
361
. get ( `/api/v2/event-types/${ username } /public` )
362
- // note: bearer token value mocked using "withAccessTokenAuth " for user which id is used when creating event type above
362
+ // note: bearer token value mocked using "withApiAuth " for user which id is used when creating event type above
363
363
. set ( "Authorization" , `Bearer whatever` )
364
364
. expect ( 200 ) ;
365
365
@@ -375,7 +375,7 @@ describe("Event types Endpoints", () => {
375
375
it ( `/GET/:id not existing` , async ( ) => {
376
376
await request ( app . getHttpServer ( ) )
377
377
. get ( `/api/v2/event-types/1000` )
378
- // note: bearer token value mocked using "withAccessTokenAuth " for user which id is used when creating event type above
378
+ // note: bearer token value mocked using "withApiAuth " for user which id is used when creating event type above
379
379
. set ( "Authorization" , `Bearer whatever` )
380
380
. expect ( 404 ) ;
381
381
} ) ;
0 commit comments