From fd53d31890f7ed17203c9dc279e468d456eecc28 Mon Sep 17 00:00:00 2001 From: Daniele Teti Date: Wed, 31 May 2023 09:03:49 +0200 Subject: [PATCH] fixing failing tests (WIP) --- sources/MVCFramework.CrossSocket.WebBrokerBridge.pas | 3 +-- unittests/general/Several/LiveServerTestU.pas | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sources/MVCFramework.CrossSocket.WebBrokerBridge.pas b/sources/MVCFramework.CrossSocket.WebBrokerBridge.pas index 452a787c..effc1390 100644 --- a/sources/MVCFramework.CrossSocket.WebBrokerBridge.pas +++ b/sources/MVCFramework.CrossSocket.WebBrokerBridge.pas @@ -594,8 +594,7 @@ begin fResponse.ContentType := ContentType; ContentStream.Position := 0; fResponse.Header.Add('Server', 'DelphiMVCFramework', False); - //fResponse.StatusCode := fStatusCode; - fResponse.SendStatus(fStatusCode, fReasonString); + fResponse.StatusCode := fStatusCode; fResponse.Send(ContentStream); end else diff --git a/unittests/general/Several/LiveServerTestU.pas b/unittests/general/Several/LiveServerTestU.pas index 0bc088c4..7570db6d 100644 --- a/unittests/general/Several/LiveServerTestU.pas +++ b/unittests/general/Several/LiveServerTestU.pas @@ -2919,9 +2919,9 @@ end; procedure TJSONRPCServerTest.TestHooksNotifWhenOnBeforeCallHookRaisesError; var lResp: IJSONRPCResponse; + lNotif: IJSONRPCNotification; begin - var - lNotif: IJSONRPCNotification := TJSONRPCNotification.Create('error_OnBeforeCallHook'); + lNotif := TJSONRPCNotification.Create('error_OnBeforeCallHook'); lResp := FExecutor3.ExecuteNotification(lNotif); Assert.areEqual('', FExecutor3.HTTPResponse.HeaderValue['x-history']); Assert.isTrue(lResp.IsError);