Skip to content

Commit

Permalink
test(tutorservice): add tutor service integration testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Veirt committed Nov 19, 2024
1 parent 0ec727d commit b678cd3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/tutorService.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
updateTutorServiceSchema,
} from "@schemas/tutorService.schema";
import firebase from "firebase-admin";
import { DocumentData, Firestore } from "firebase-admin/firestore";
import { Firestore } from "firebase-admin/firestore";
import { z } from "zod";

export interface TutorServiceServiceDependencies {
Expand Down
16 changes: 16 additions & 0 deletions tests/integration/tutorService.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { app } from "@/main";
import { seedTutors } from "@/seeders/tutor.seeder";
import { seedServices } from "@/seeders/tutorService.seeder";
import supertest from "supertest";
import { beforeAll, describe, test } from "vitest";

beforeAll(async () => {
await seedTutors();
await seedServices({ randomTeachingMethodology: true });
});

describe("Get tutor services", async () => {
test("Get all tutor services without token", async () => {
await supertest(app).get("/api/v1/tutors/services").expect(401);
});
});

0 comments on commit b678cd3

Please sign in to comment.