mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-23 00:00:31 +00:00
refactor: e2e test cases
This commit is contained in:
@@ -90,6 +90,13 @@ describe('Sale Receipts (e2e)', () => {
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/sale-receipts (GET)', async () => {
|
||||
return request(app.getHttpServer())
|
||||
.get('/sale-receipts')
|
||||
.set('organization-id', orgainzationId)
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/sale-receipts/:id (GET)', async () => {
|
||||
const response = await request(app.getHttpServer())
|
||||
.post('/sale-receipts')
|
||||
@@ -103,4 +110,16 @@ describe('Sale Receipts (e2e)', () => {
|
||||
.set('organization-id', orgainzationId)
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/sale-receipts/:id/mail (GET)', async () => {
|
||||
const response = await request(app.getHttpServer())
|
||||
.post('/sale-receipts')
|
||||
.set('organization-id', orgainzationId)
|
||||
.send(makeReceiptRequest());
|
||||
|
||||
return request(app.getHttpServer())
|
||||
.get(`/sale-receipts/${response.body.id}/mail`)
|
||||
.set('organization-id', orgainzationId)
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user