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

18 lines
408 B
JavaScript
Raw Normal View History

2018-01-01 14:57:59 +05:30
const assert = require('assert');
const frappe = require('frappe-core');
2018-01-03 12:19:59 +05:30
const helpers = require('./helpers');
2018-01-01 14:57:59 +05:30
describe('Controller', () => {
2018-01-02 15:40:32 +05:30
before(async function() {
2018-01-03 12:19:59 +05:30
await helpers.init_sqlite();
2018-01-01 14:57:59 +05:30
});
2018-01-02 15:40:32 +05:30
it('should call controller method', async () => {
let doc = await frappe.get_doc({
2018-01-01 14:57:59 +05:30
doctype:'ToDo',
subject: 'test'
});
2018-01-02 15:40:32 +05:30
doc.trigger('validate');
2018-01-01 14:57:59 +05:30
assert.equal(doc.status, 'Open');
});
});