mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat(server): more e2e test cases
This commit is contained in:
34
packages/server/test/banking-categorize.e2e-spec.ts
Normal file
34
packages/server/test/banking-categorize.e2e-spec.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import * as request from 'supertest';
|
||||
import { app, AuthorizationHeader, orgainzationId } from './init-app-test';
|
||||
|
||||
describe('Banking Categorize (e2e)', () => {
|
||||
it('/banking/categorize (POST)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.post('/banking/categorize')
|
||||
.set('organization-id', orgainzationId)
|
||||
.set('Authorization', AuthorizationHeader)
|
||||
.send({
|
||||
uncategorizedTransactionIds: [1],
|
||||
accountId: 1000,
|
||||
categoryId: 1,
|
||||
})
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/banking/categorize/:id (DELETE)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.delete('/banking/categorize/1')
|
||||
.set('organization-id', orgainzationId)
|
||||
.set('Authorization', AuthorizationHeader)
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/banking/categorize/bulk (DELETE)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.delete('/banking/categorize/bulk')
|
||||
.query({ uncategorizedTransactionIds: [1, 2] })
|
||||
.set('organization-id', orgainzationId)
|
||||
.set('Authorization', AuthorizationHeader)
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user