2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 15:50:56 +00:00
books/frappe/tests/test_controller.js

18 lines
391 B
JavaScript
Raw Normal View History

2018-01-01 09:27:59 +00:00
const assert = require('assert');
const frappe = require('frappe-core');
describe('Controller', () => {
2018-01-02 10:10:32 +00:00
before(async function() {
await frappe.init();
await frappe.db.migrate();
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');
});
});