mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Cache is disabled for json responses.
This commit is contained in:
@@ -5,6 +5,7 @@ using NLog;
|
||||
using NzbDrone.Api.REST;
|
||||
using NzbDrone.Common.Serializer;
|
||||
using RestSharp;
|
||||
using System.Linq;
|
||||
|
||||
namespace NzbDrone.Integration.Test.Client
|
||||
{
|
||||
@@ -99,6 +100,8 @@ namespace NzbDrone.Integration.Test.Client
|
||||
throw response.ErrorException;
|
||||
}
|
||||
|
||||
AssertDisableCache(response.Headers);
|
||||
|
||||
response.ErrorMessage.Should().BeBlank();
|
||||
|
||||
response.StatusCode.Should().Be(statusCode);
|
||||
@@ -106,5 +109,13 @@ namespace NzbDrone.Integration.Test.Client
|
||||
return Json.Deserialize<T>(response.Content);
|
||||
}
|
||||
|
||||
|
||||
private static void AssertDisableCache(IList<Parameter> headers)
|
||||
{
|
||||
headers.Single(c => c.Name == "Cache-Control").Value.Should().Be("no-cache, no-store, must-revalidate");
|
||||
headers.Single(c => c.Name == "Pragma").Value.Should().Be("no-cache");
|
||||
headers.Single(c => c.Name == "Expires").Value.Should().Be("0");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user