You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/NzbDrone.Core.Test/UpdateTests/UpdatePackageProviderFixtur...

29 lines
934 B

using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Update;
12 years ago
using System.Linq;
namespace NzbDrone.Core.Test.UpdateTests
{
public class UpdatePackageProviderFixture : CoreTest<UpdatePackageProvider>
{
12 years ago
[Test]
public void should_get_list_of_available_updates()
12 years ago
{
UseRealHttp();
Mocker.GetMock<IConfigFileProvider>().SetupGet(c => c.Branch).Returns("master");
12 years ago
var updates = Subject.GetAvailablePackages().ToList();
updates.Should().NotBeEmpty();
updates.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.FileName));
updates.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.Url));
updates.Should().OnlyContain(c => c.Version != null);
updates.Should().OnlyContain(c => c.Version.Major == 2);
12 years ago
}
}
}