mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
fix: e2e test cases
This commit is contained in:
@@ -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('Vendors (e2e)', () => {
|
||||
describe.only('Vendors (e2e)', () => {
|
||||
it('/vendors (POST)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.post('/vendors')
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.send({
|
||||
displayName: faker.commerce.productName(),
|
||||
email: faker.internet.email(),
|
||||
@@ -19,7 +19,7 @@ describe('Vendors (e2e)', () => {
|
||||
it('/vendors/:id (PUT)', async () => {
|
||||
const response = await request(app.getHttpServer())
|
||||
.post('/vendors')
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.send({
|
||||
displayName: faker.commerce.productName(),
|
||||
email: faker.internet.email(),
|
||||
@@ -30,7 +30,7 @@ describe('Vendors (e2e)', () => {
|
||||
|
||||
return request(app.getHttpServer())
|
||||
.put(`/vendors/${vendorId}`)
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.send({
|
||||
displayName: faker.commerce.productName(),
|
||||
email: faker.internet.email(),
|
||||
@@ -43,7 +43,7 @@ describe('Vendors (e2e)', () => {
|
||||
it('/vendors/:id (GET)', async () => {
|
||||
const response = await request(app.getHttpServer())
|
||||
.post('/vendors')
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.send({
|
||||
displayName: faker.commerce.productName(),
|
||||
email: faker.internet.email(),
|
||||
@@ -54,14 +54,14 @@ describe('Vendors (e2e)', () => {
|
||||
|
||||
return request(app.getHttpServer())
|
||||
.get(`/vendors/${vendorId}`)
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/vendors/:id (DELETE)', async () => {
|
||||
const response = await request(app.getHttpServer())
|
||||
.post('/vendors')
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.send({
|
||||
displayName: faker.commerce.productName(),
|
||||
});
|
||||
@@ -69,7 +69,7 @@ describe('Vendors (e2e)', () => {
|
||||
|
||||
return request(app.getHttpServer())
|
||||
.delete(`/vendors/${vendorId}`)
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user