From 968dadf0520a9545f5b13963cc1963ce569f5840 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Thu, 15 Nov 2018 15:09:32 +0100 Subject: [PATCH] Tests fixed. --- src/Squidex/app/shared/services/assets.service.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Squidex/app/shared/services/assets.service.spec.ts b/src/Squidex/app/shared/services/assets.service.spec.ts index 654f59383..3ff92f625 100644 --- a/src/Squidex/app/shared/services/assets.service.spec.ts +++ b/src/Squidex/app/shared/services/assets.service.spec.ts @@ -346,7 +346,7 @@ describe('AssetsService', () => { new Version('2'))); })); - it('should return proper error when upload failed with 403', + it('should return proper error when upload failed with 413', inject([AssetsService, HttpTestingController], (assetsService: AssetsService, httpMock: HttpTestingController) => { let asset: AssetDto; @@ -401,7 +401,7 @@ describe('AssetsService', () => { 2048)); })); - it('should return proper error when upload failed with 403', + it('should return proper error when replace failed with 413', inject([AssetsService, HttpTestingController], (assetsService: AssetsService, httpMock: HttpTestingController) => { let asset: AssetReplacedDto; @@ -415,8 +415,8 @@ describe('AssetsService', () => { const req = httpMock.expectOne('http://service/p/api/apps/my-app/assets/123/content'); - expect(req.request.method).toEqual('POST'); - expect(req.request.headers.get('If-Match')).toBeNull(); + expect(req.request.method).toEqual('PUT'); + expect(req.request.headers.get('If-Match')).toEqual(version.value); req.flush({}, { status: 413, statusText: 'Payload too large' });