Parcourir la source

test(server): Fix failing test

Michael Bromley il y a 7 ans
Parent
commit
af1574b67f
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      server/src/service/product.service.spec.ts

+ 1 - 0
server/src/service/product.service.spec.ts

@@ -112,6 +112,7 @@ describe('ProductService', () => {
 
 
     describe('update()', () => {
     describe('update()', () => {
         it('uses the TranslationUpdater to diff the translations', async () => {
         it('uses the TranslationUpdater to diff the translations', async () => {
+            connection.manager.save.mockReturnValue({ id: 1 });
             connection.manager.findOne.mockReturnValue(Promise.resolve());
             connection.manager.findOne.mockReturnValue(Promise.resolve());
             connection.registerMockRepository(ProductTranslation).find.mockReturnValue([]);
             connection.registerMockRepository(ProductTranslation).find.mockReturnValue([]);
             const productFromApplyDiffCall = {};
             const productFromApplyDiffCall = {};