mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat(nestjs): migrate to NestJS
This commit is contained in:
36
packages/server/test/settings.e2e-spec.ts
Normal file
36
packages/server/test/settings.e2e-spec.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import * as request from 'supertest';
|
||||
import { app, AuthorizationHeader, orgainzationId } from './init-app-test';
|
||||
|
||||
const makeSettingsRequest = () => ({
|
||||
options: [
|
||||
{
|
||||
group: 'credit_note',
|
||||
key: 'customer_notes',
|
||||
value: 'Customer Notes...',
|
||||
},
|
||||
{
|
||||
group: 'credit_note',
|
||||
key: 'terms_conditions',
|
||||
value: 'Terms & Conditions...',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
describe('Settings (e2e)', () => {
|
||||
it('/settings (PUT)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.put('/settings')
|
||||
.set('organization-id', orgainzationId)
|
||||
.set('Authorization', AuthorizationHeader)
|
||||
.send(makeSettingsRequest())
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/settings (GET)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.get('/settings')
|
||||
.set('organization-id', orgainzationId)
|
||||
.set('Authorization', AuthorizationHeader)
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user