2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 15:50:56 +00:00
books/tests/test_meta.js
Rushabh Mehta 328a9de7d4 💥 frappejs
2018-01-16 11:39:17 +05:30

22 lines
657 B
JavaScript

const assert = require('assert');
const frappe = require('frappejs');
const helpers = require('./helpers');
describe('Meta', () => {
before(async function() {
await helpers.init_sqlite();
});
it('should get init from json file', () => {
let todo = frappe.get_meta('ToDo');
assert.equal(todo.issingle, 0);
});
it('should get fields from meta', () => {
let todo = frappe.get_meta('ToDo');
let fields = todo.fields.map((df) => df.fieldname);
assert.ok(fields.includes('subject'));
assert.ok(fields.includes('description'));
assert.ok(fields.includes('status'));
});
});