mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Cache is disabled for json responses.
This commit is contained in:
parent
b029195260
commit
642207c68d
5 changed files with 40 additions and 8 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue