added restoreFixtures to a afterAll method on create and addressesPropagateRe spec files

This commit is contained in:
Carlos Jimenez 2018-01-24 08:09:39 +01:00
parent 108fb92d73
commit 8801c20071
2 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,7 @@
import app from '../../../../server/server';
import {catchErrors} from '../../../../../../services/utils/jasmineHelpers';
import restoreFixtures from '../../../../../../services/db/testing_fixtures';
import { fileExistsSync } from '../../../../../loopback/node_modules/loopback-boot/lib/utils';
describe('Client addressesPropagateRe', () => {
let fixturesToApply = {tables: ['`account`.`user`', '`vn2008`.`Clientes`', '`vn2008`.`Consignatarios`'], inserts: [
@ -49,6 +50,10 @@ describe('Client addressesPropagateRe', () => {
restoreFixtures(fixturesToApply, done);
});
afterAll(done => {
restoreFixtures(fixturesToApply, done);
});
it('should propagate the isEqualizated on both addresses of Mr Wayne', done => {
let id = 1;
let data = {

View File

@ -49,6 +49,10 @@ describe('Client Create', () => {
restoreFixtures(fixturesToApply, done);
});
afterAll(done => {
restoreFixtures(fixturesToApply, done);
});
let newAccountData = {
active: true,
name: 'Wade',