mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +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('Pdf Templates (e2e)', () => {
|
||||
it('/pdf-templates (POST)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.post('/pdf-templates')
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.send({
|
||||
template_name: 'Standard',
|
||||
resource: 'SaleInvoice',
|
||||
@@ -18,7 +18,7 @@ describe('Pdf Templates (e2e)', () => {
|
||||
it('/pdf-templates (DELETE)', async () => {
|
||||
const response = await request(app.getHttpServer())
|
||||
.post('/pdf-templates')
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.send({
|
||||
template_name: 'Standard',
|
||||
resource: 'SaleInvoice',
|
||||
@@ -28,14 +28,14 @@ describe('Pdf Templates (e2e)', () => {
|
||||
|
||||
return request(app.getHttpServer())
|
||||
.delete(`/pdf-templates/${pdfTemplateId}`)
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/pdf-templates/:id (GET)', async () => {
|
||||
const response = await request(app.getHttpServer())
|
||||
.post('/pdf-templates')
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.send({
|
||||
template_name: 'Standard',
|
||||
resource: 'SaleInvoice',
|
||||
@@ -45,14 +45,14 @@ describe('Pdf Templates (e2e)', () => {
|
||||
|
||||
return request(app.getHttpServer())
|
||||
.get(`/pdf-templates/${pdfTemplateId}`)
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/pdf-templates/:id/assign-default (POST)', async () => {
|
||||
const response = await request(app.getHttpServer())
|
||||
.post('/pdf-templates')
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.send({
|
||||
template_name: 'Standard',
|
||||
resource: 'SaleInvoice',
|
||||
@@ -62,7 +62,7 @@ describe('Pdf Templates (e2e)', () => {
|
||||
|
||||
return request(app.getHttpServer())
|
||||
.put(`/pdf-templates/${pdfTemplateId}/assign-default`)
|
||||
.set('organization-id', '4064541lv40nhca')
|
||||
.set('organization-id', orgainzationId)
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user