fixing failing tests (WIP)

This commit is contained in:
Daniele Teti 2023-05-31 09:03:49 +02:00
parent c2db9b1bf7
commit fd53d31890
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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);