fix: e2e test cases

This commit is contained in:
Ahmed Bouhuolia
2025-01-11 18:03:59 +02:00
parent 7e82080cb7
commit ddaea20d16
32 changed files with 503 additions and 248 deletions

View File

@@ -1,12 +1,12 @@
import * as request from 'supertest';
import { faker } from '@faker-js/faker';
import { app } from './init-app-test';
import { app, orgainzationId } from './init-app-test';
describe('Item Categories(e2e)', () => {
it('/tax-rates (POST)', () => {
return request(app.getHttpServer())
.post('/tax-rates')
.set('organization-id', '4064541lv40nhca')
.set('organization-id', orgainzationId)
.send({
name: faker.person.fullName(),
rate: 2,
@@ -19,7 +19,7 @@ describe('Item Categories(e2e)', () => {
it('/tax-rates/:id (DELETE)', async () => {
const response = await request(app.getHttpServer())
.post('/tax-rates')
.set('organization-id', '4064541lv40nhca')
.set('organization-id', orgainzationId)
.send({
name: faker.person.fullName(),
rate: 2,
@@ -30,7 +30,7 @@ describe('Item Categories(e2e)', () => {
return request(app.getHttpServer())
.delete(`/tax-rates/${taxRateId}`)
.set('organization-id', '4064541lv40nhca')
.set('organization-id', orgainzationId)
.expect(200);
});
});