Round 3 of Bugfixing (#3318)
This commit is contained in:
parent
727fbd353b
commit
abdf15b895
40 changed files with 482 additions and 489 deletions
|
@ -187,6 +187,36 @@ public class ScannerServiceTests : AbstractDbTest
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Special Keywords shouldn't be removed from the series name and thus these 2 should group
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task ScanLibrary_ExtraShouldNotAffect()
|
||||
{
|
||||
const string testcase = "Series with Extra - Manga.json";
|
||||
|
||||
// Get the first file and generate a ComicInfo
|
||||
var infos = new Dictionary<string, ComicInfo>();
|
||||
infos.Add("Vol.01.cbz", new ComicInfo()
|
||||
{
|
||||
Series = "The Novel's Extra",
|
||||
});
|
||||
|
||||
var library = await GenerateScannerData(testcase, infos);
|
||||
|
||||
|
||||
var scanner = CreateServices();
|
||||
await scanner.ScanLibrary(library.Id);
|
||||
var postLib = await _unitOfWork.LibraryRepository.GetLibraryForIdAsync(library.Id, LibraryIncludes.Series);
|
||||
|
||||
Assert.NotNull(postLib);
|
||||
Assert.Single(postLib.Series);
|
||||
var s = postLib.Series.First();
|
||||
Assert.Equal("The Novel's Extra", s.Name);
|
||||
Assert.Equal(2, s.Volumes.Count);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Files under a folder with a SP marker should group into one issue
|
||||
/// </summary>
|
||||
|
|
|
@ -52,7 +52,7 @@ public class TachiyomiServiceTests
|
|||
Substitute.For<IEventHub>(), Substitute.For<IImageService>(),
|
||||
new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), new MockFileSystem()),
|
||||
Substitute.For<IScrobblingService>());
|
||||
_tachiyomiService = new TachiyomiService(_unitOfWork, _mapper, Substitute.For<ILogger<ReaderService>>(), _readerService);
|
||||
_tachiyomiService = new TachiyomiService(_unitOfWork, _mapper, Substitute.For<ILogger<TachiyomiService>>(), _readerService);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[
|
||||
"The Novel's Extra (Remake)/Vol.01.cbz",
|
||||
"The Novel's Extra (Remake)/The Novel's Extra Chapter 100.cbz"
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue