1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-25 22:37:27 -04:00

Fixed: Automation/Integration/Unit Tests

This commit is contained in:
Qstick
2019-09-02 22:22:25 -04:00
parent 944f420270
commit 7f221c7834
123 changed files with 1384 additions and 1191 deletions
@@ -2,7 +2,6 @@ using System.Collections.Generic;
using System.Net;
using FluentAssertions;
using NLog;
using NzbDrone.Api;
using Radarr.Http.REST;
using Radarr.Http;
using NzbDrone.Common.Serializer;
@@ -40,7 +39,7 @@ namespace NzbDrone.Integration.Test.Client
return request;
}
public T Execute<T>(IRestRequest request, HttpStatusCode statusCode) where T : class, new()
public string Execute(IRestRequest request, HttpStatusCode statusCode)
{
_logger.Info("{0}: {1}", request.Method, _restClient.BuildUri(request));
@@ -58,7 +57,14 @@ namespace NzbDrone.Integration.Test.Client
response.StatusCode.Should().Be(statusCode);
return Json.Deserialize<T>(response.Content);
return response.Content;
}
public T Execute<T>(IRestRequest request, HttpStatusCode statusCode) where T : class, new()
{
var content = Execute(request, statusCode);
return Json.Deserialize<T>(content);
}
private static void AssertDisableCache(IList<Parameter> headers)