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

18 lines
375 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);
2019-05-30 06:41:08 +00:00
expect(newZone.name).toEqual('Zone pickup A');
2019-03-14 14:07:24 +00:00
});
});