WIP pass the failed tests.

This commit is contained in:
Ahmed Bouhuolia
2020-05-17 07:08:12 +02:00
parent 00de156c9f
commit 10f636d2bc
77 changed files with 2164 additions and 1403 deletions

View File

@@ -1,12 +1,17 @@
import { create, expect } from '~/testInit';
import Option from '@/models/Option';
import MetableCollection from '@/lib/Metable/MetableCollection';
import {
tenantFactory,
tenantWebsite,
} from '~/dbInit';
describe('Model: Option', () => {
it('Should result collection be instance of `MetableCollection` class.', async () => {
await create('option');
await create('option');
const options = await Option.query();
await tenantFactory.create('option');
await tenantFactory.create('option');
const options = await Option.tenant().query();
expect(options).to.be.an.instanceof(MetableCollection);
});