salix/modules/agency/back/methods/zone/specs/clone.spec.js

18 lines
370 B
JavaScript
Raw Normal View History

2019-03-14 14:07:24 +00:00
const app = require('vn-loopback/server/server');
describe('agency clone()', () => {
let newZone;
afterAll(async done => {
await app.models.Zone.destroyById(newZone.id);
done();
});
it('should clone a zone', async() => {
newZone = await app.models.Zone.clone(1);
expect(newZone.name).toEqual('Zone 1 A');
});
});