2020-10-28 22:23:07 +00:00
|
|
|
import { globalBeforeEach } from '../../__jest__/before-each';
|
2021-07-22 23:04:56 +00:00
|
|
|
import * as models from '../index';
|
2020-10-28 22:23:07 +00:00
|
|
|
|
|
|
|
describe('create()', () => {
|
|
|
|
beforeEach(globalBeforeEach);
|
|
|
|
|
|
|
|
it('fails when missing parentId', async () => {
|
2021-05-12 06:35:00 +00:00
|
|
|
expect(() =>
|
|
|
|
models.requestMeta.create({
|
|
|
|
pinned: true,
|
|
|
|
}),
|
|
|
|
).toThrow('New RequestMeta missing `parentId`');
|
|
|
|
}); // it('fails when parentId prefix is not that of a Request', async () => {
|
2020-12-01 20:29:30 +00:00
|
|
|
// expect(() => models.requestMeta.create({ parentId: 'greq_123' })).toThrow(
|
|
|
|
// 'Expected the parent of RequestMeta to be a Request',
|
|
|
|
// );
|
|
|
|
// });
|
2020-10-28 22:23:07 +00:00
|
|
|
});
|