mirror of https://github.com/Sonarr/Sonarr
Added tests for RootFolderCheck
Fixed: Progress bar colour when series is continuing Fixed: Episode Title in tables will show proper cursor and underline
This commit is contained in:
parent
e5ea50e1dc
commit
30c82f2613
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FizzWare.NBuilder;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Core.HealthCheck.Checks;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
namespace NzbDrone.Core.Test.HealthCheck.Checks
|
||||
{
|
||||
[TestFixture]
|
||||
public class RootFolderCheckFixture : CoreTest<RootFolderCheck>
|
||||
{
|
||||
private void GivenMissingRootFolder()
|
||||
{
|
||||
var series = Builder<Series>.CreateListOfSize(1)
|
||||
.Build()
|
||||
.ToList();
|
||||
|
||||
Mocker.GetMock<ISeriesService>()
|
||||
.Setup(s => s.GetAllSeries())
|
||||
.Returns(series);
|
||||
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(s => s.GetParentFolder(series.First().Path))
|
||||
.Returns(@"C:\TV");
|
||||
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(s => s.FolderExists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_return_error_when_no_series()
|
||||
{
|
||||
Mocker.GetMock<ISeriesService>()
|
||||
.Setup(s => s.GetAllSeries())
|
||||
.Returns(new List<Series>());
|
||||
|
||||
Subject.Check().ShouldBeOk();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_error_if_series_parent_is_missing()
|
||||
{
|
||||
GivenMissingRootFolder();
|
||||
|
||||
Subject.Check().ShouldBeError();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,10 @@
|
|||
using System;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Core.HealthCheck;
|
||||
using NzbDrone.Core.HealthCheck.Checks;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
|
|
|
@ -125,6 +125,7 @@
|
|||
<Compile Include="Framework\CoreTest.cs" />
|
||||
<Compile Include="Framework\DbTest.cs" />
|
||||
<Compile Include="Framework\NBuilderExtensions.cs" />
|
||||
<Compile Include="HealthCheck\Checks\RootFolderCheckFixture.cs" />
|
||||
<Compile Include="HealthCheck\Checks\DownloadClientCheckFixture.cs" />
|
||||
<Compile Include="HealthCheck\Checks\UpdateCheckFixture.cs" />
|
||||
<Compile Include="HealthCheck\Checks\IndexerCheckFixture.cs" />
|
||||
|
|
|
@ -5,11 +5,6 @@
|
|||
@import "../Content/mixins";
|
||||
@import "../Content/variables";
|
||||
|
||||
.table {
|
||||
|
||||
//table-layout: fixed;
|
||||
}
|
||||
|
||||
.series-title {
|
||||
.text-overflow();
|
||||
|
||||
|
@ -24,9 +19,10 @@
|
|||
color: #428bca;
|
||||
text-decoration: none;
|
||||
|
||||
&.focus, &.hover {
|
||||
&:focus, &:hover {
|
||||
color: #2a6496;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@media @lg {
|
||||
|
|
|
@ -47,7 +47,7 @@ define(
|
|||
|
||||
Handlebars.registerHelper('EpisodeProgressClass', function () {
|
||||
if (this.episodeFileCount === this.episodeCount) {
|
||||
if (this.continuing) {
|
||||
if (this.status === 'continuing') {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue