mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat(server): more e2e test cases
This commit is contained in:
32
packages/server/test/banking-matching.e2e-spec.ts
Normal file
32
packages/server/test/banking-matching.e2e-spec.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import * as request from 'supertest';
|
||||
import { app, AuthorizationHeader, orgainzationId } from './init-app-test';
|
||||
|
||||
describe('Banking Matching (e2e)', () => {
|
||||
it('/banking/matching/matched (GET)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.get('/banking/matching/matched')
|
||||
.set('organization-id', orgainzationId)
|
||||
.set('Authorization', AuthorizationHeader)
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/banking/matching/match (POST)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.post('/banking/matching/match')
|
||||
.set('organization-id', orgainzationId)
|
||||
.set('Authorization', AuthorizationHeader)
|
||||
.send({
|
||||
uncategorizedTransactions: [1],
|
||||
matchedTransactions: [1],
|
||||
})
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it('/banking/matching/unmatch/:uncategorizedTransactionId (POST)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.post('/banking/matching/unmatch/1')
|
||||
.set('organization-id', orgainzationId)
|
||||
.set('Authorization', AuthorizationHeader)
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user