mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
16 lines
620 B
JavaScript
16 lines
620 B
JavaScript
const assert = require('assert');
|
|
const frappe = require('frappejs');
|
|
const helpers = require('./helpers');
|
|
|
|
describe('Number Series', () => {
|
|
before(async function() {
|
|
await helpers.init_sqlite();
|
|
});
|
|
|
|
it('should start a series and get next value', async () => {
|
|
frappe.db.delete('Number Series', 'test-series-')
|
|
assert.equal(await frappe.model.getSeriesNext('test-series-'), 'test-series-1');
|
|
assert.equal(await frappe.model.getSeriesNext('test-series-'), 'test-series-2');
|
|
assert.equal(await frappe.model.getSeriesNext('test-series-'), 'test-series-3');
|
|
});
|
|
}); |