More logging for existing file import issue

This commit is contained in:
Mark McDowall 2013-07-21 23:31:51 -07:00
commit 19fc3bad6c
2 changed files with 40 additions and 5 deletions

View file

@ -2,6 +2,7 @@
using FizzWare.NBuilder;
using FluentAssertions;
using Marr.Data;
using Moq;
using NUnit.Framework;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.MediaFiles.EpisodeImport.Specifications;
@ -109,5 +110,28 @@ namespace NzbDrone.Core.Test.MediaFileTests.EpisodeImportTests
Subject.IsSatisfiedBy(_localEpisode).Should().BeTrue();
}
[Test]
[Explicit]
public void should_return_false_if_exact_path_exists_in_db()
{
Mocker.GetMock<IMediaFileService>()
.Setup(s => s.Exists(It.IsAny<string>()))
.Returns(true);
_localEpisode.Episodes = Builder<Episode>.CreateListOfSize(1)
.All()
.With(e => e.EpisodeFileId = 1)
.With(e => e.EpisodeFile = new LazyLoaded<EpisodeFile>(
new EpisodeFile
{
Path = @"C:\Test\30 Rock\Season 01\30.rock.s01e01.pilot.avi",
Size = 100
}))
.Build()
.ToList();
Subject.IsSatisfiedBy(_localEpisode).Should().BeFalse();
}
}
}