Fixed update test, send os when requesting update packages

This commit is contained in:
Mark McDowall 2014-03-09 00:22:35 -08:00
parent 176f3e0563
commit 57912ab86d
2 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,7 @@ namespace NzbDrone.Core.Test.UpdateTests
private readonly UpdatePackage _updatePackage = new UpdatePackage
{
FileName = "NzbDrone.develop.2.0.0.zip",
Url = "http://update.nzbdrone.com/v2/develop/NzbDrone.develop.zip",
Url = "http://update.nzbdrone.com/v2/develop/windows/NzbDrone.develop.zip",
Version = new Version("2.0.0")
};

View File

@ -22,6 +22,7 @@ namespace NzbDrone.Core.Update
var request = new RestRequest("/v1/update/{branch}");
request.AddParameter("version", currentVersion);
request.AddParameter("os", OsInfo.Os.ToString().ToLowerInvariant());
request.AddUrlSegment("branch", branch);
var update = restClient.ExecuteAndValidate<UpdatePackageAvailable>(request);
@ -38,6 +39,7 @@ namespace NzbDrone.Core.Update
var request = new RestRequest("/v1/update/{branch}/changes");
request.AddParameter("majorVersion", BuildInfo.Version.Major);
request.AddParameter("os", OsInfo.Os.ToString().ToLowerInvariant());
request.AddUrlSegment("branch", branch);
var updates = restClient.ExecuteAndValidate<List<UpdatePackage>>(request);