refactor: settings to nestjs

This commit is contained in:
Ahmed Bouhuolia
2025-01-11 11:02:57 +02:00
parent 3bf5f4be86
commit 7e82080cb7
7 changed files with 89 additions and 7 deletions

View File

@@ -0,0 +1,34 @@
import * as request from 'supertest';
import { app } 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', '4064541lv40nhca')
.send(makeSettingsRequest())
.expect(200);
});
it('/settings (GET)', () => {
return request(app.getHttpServer())
.get('/settings')
.set('organization-id', '4064541lv40nhca')
.expect(200);
});
});