The last push before release (#2696)

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo 2024-02-07 14:03:30 -06:00 committed by GitHub
parent 2227dc354b
commit 033dc61d54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 681 additions and 433 deletions

View file

@ -1687,6 +1687,35 @@ public class ReaderServiceTests
}
[Fact]
public async Task GetContinuePoint_ShouldReturnFirstChapter_WhenHasSpecial()
{
await ResetDb();
var series = new SeriesBuilder("Test")
// Loose chapters
.WithVolume(new VolumeBuilder("0")
.WithChapter(new ChapterBuilder("1").WithPages(1).Build())
.WithChapter(new ChapterBuilder("2").WithPages(1).Build())
.WithChapter(new ChapterBuilder("Prologue").WithIsSpecial(true).WithPages(1).Build())
.Build())
.Build();
series.Library = new LibraryBuilder("Test LIb", LibraryType.Manga).Build();
_context.Series.Add(series);
_context.AppUser.Add(new AppUser()
{
UserName = "majora2007"
});
await _context.SaveChangesAsync();
var nextChapter = await _readerService.GetContinuePoint(1, 1);
Assert.Equal("1", nextChapter.Range);
}
[Fact]
public async Task GetContinuePoint_ShouldReturnFirstSpecial()
{