2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 19:29:02 +00:00
books/frappe/tests/test_controller.js

18 lines
408 B
JavaScript
Raw Normal View History

2018-01-01 09:27:59 +00:00
const assert = require('assert');
const frappe = require('frappe-core');
2018-01-03 06:49:59 +00:00
const helpers = require('./helpers');
2018-01-01 09:27:59 +00:00
describe('Controller', () => {
2018-01-02 10:10:32 +00:00
before(async function() {
2018-01-03 06:49:59 +00:00
await helpers.init_sqlite();
2018-01-01 09:27:59 +00:00
});
2018-01-02 10:10:32 +00:00
it('should call controller method', async () => {
let doc = await frappe.get_doc({
2018-01-01 09:27:59 +00:00
doctype:'ToDo',
subject: 'test'
});
2018-01-02 10:10:32 +00:00
doc.trigger('validate');
2018-01-01 09:27:59 +00:00
assert.equal(doc.status, 'Open');
});
});