mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
User configurable RSS Sync Time
New: RSS Sync Interval is now user configurable (Default 25 minutes)
This commit is contained in:
parent
23f8f534fc
commit
8280561e11
9 changed files with 84 additions and 7 deletions
35
NzbDrone.Core.Test/JobTests/RssSyncJobTest.cs
Normal file
35
NzbDrone.Core.Test/JobTests/RssSyncJobTest.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Jobs;
|
||||
using NzbDrone.Core.Model.Notification;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.Providers.Core;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Test.Common.AutoMoq;
|
||||
|
||||
namespace NzbDrone.Core.Test.JobTests
|
||||
{
|
||||
[TestFixture]
|
||||
// ReSharper disable InconsistentNaming
|
||||
public class RssSyncJobTest : CoreTest
|
||||
{
|
||||
public void WithMinutes(int minutes)
|
||||
{
|
||||
Mocker.GetMock<ConfigProvider>().SetupGet(s => s.RssSyncInterval).Returns(minutes);
|
||||
}
|
||||
|
||||
[TestCase(10)]
|
||||
[TestCase(15)]
|
||||
[TestCase(25)]
|
||||
[TestCase(60)]
|
||||
[TestCase(120)]
|
||||
public void should_use_value_from_config_provider(int minutes)
|
||||
{
|
||||
WithMinutes(minutes);
|
||||
Mocker.Resolve<RssSyncJob>().DefaultInterval.Should().Be(TimeSpan.FromMinutes(minutes));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue