2
0
mirror of https://github.com/frappe/books.git synced 2025-01-26 16:48:28 +00:00
books/tests/test_controller.js

18 lines
457 B
JavaScript
Raw Normal View History

2018-01-12 17:55:07 +05:30
const assert = require('assert');
2018-01-16 11:39:17 +05:30
const frappe = require('frappejs');
2018-01-12 17:55:07 +05:30
const helpers = require('./helpers');
describe('Controller', () => {
before(async function() {
await helpers.initSqlite();
2018-01-12 17:55:07 +05:30
});
it('should call controller method', async () => {
2018-02-08 17:58:51 +05:30
let doc = frappe.newDoc({
2018-01-12 17:55:07 +05:30
doctype:'ToDo',
subject: 'test'
});
doc.trigger('validate');
assert.equal(doc.status, 'Open');
});
});