mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
Permissions authorization middleware.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { request, expect } from '~/testInit';
|
||||
import { request, expect, create } from '~/testInit';
|
||||
|
||||
describe('routes: `/accountOpeningBalance`', () => {
|
||||
describe('POST `/accountOpeningBalance`', () => {
|
||||
@@ -40,5 +40,16 @@ describe('routes: `/accountOpeningBalance`', () => {
|
||||
type: 'NOT_FOUND_ACCOUNT', code: 100, ids: [100],
|
||||
});
|
||||
});
|
||||
|
||||
it('Should store the given credit and debit to the account balance in the storage.', async () => {
|
||||
const account = await create('account');
|
||||
const res = await request().post('/api/accountOpeningBalance').send({
|
||||
accounts: [
|
||||
{ id: account.id, credit: 100, debit: 2 },
|
||||
],
|
||||
});
|
||||
|
||||
console.log(res.status);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user