
* Cleaned up some old code in download bookmark that could create pointless temp folders. * Fixed a bad http call on reading list remove read and cleaned up the messaging * Undid an optimization in finding cover image due to it perfoming depth first rather than breadth. * Updated CleanComicInfo to have Translators and CoverArtists, which were previously missing. * Renamed Refresh Metadata to Refresh Covers on the UI, given Metadata refresh is done in Scan. * Library detail will now retain the search query in the UI. Reduced the amount of api calls to the backend on load. * Reverted allowing the filter to reside in the UI (even though it does work). * Updated the Age Rating to match the v2.1 spec. * Fixed a bug where progress wasn't being saved * Fixed line height not having any effect due to not applying to children elements in the reader * Fixed some wording for Refresh Covers confirmation * Delete Series will now send an event to the UI informing that series was deleted. * Change Progress widget to show Refreshing Covers for * When we exit early due to potential missing folders/drives in a scan, tell the UI that scan is 100% done. * Fixed manage library not supressing scan loader when a complete came in * Fixed a spelling difference for Publication Status between filter and series detail * Fixed a bug where collection detail page would flash on first load due to duplicate load events * Added bookmarks to backups * Fixed issues where fullscreen mode would break infinite scroller contiunous reader
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using API.Data.Metadata;
|
|
using API.Entities.Enums;
|
|
using Xunit;
|
|
|
|
namespace API.Tests.Entities;
|
|
|
|
public class ComicInfoTests
|
|
{
|
|
#region ConvertAgeRatingToEnum
|
|
|
|
[Theory]
|
|
[InlineData("G", AgeRating.G)]
|
|
[InlineData("Everyone", AgeRating.Everyone)]
|
|
[InlineData("Teen", AgeRating.Teen)]
|
|
[InlineData("Adults Only 18+", AgeRating.AdultsOnly)]
|
|
[InlineData("Early Childhood", AgeRating.EarlyChildhood)]
|
|
[InlineData("Everyone 10+", AgeRating.Everyone10Plus)]
|
|
[InlineData("M", AgeRating.Mature)]
|
|
[InlineData("MA 15+", AgeRating.Mature15Plus)]
|
|
[InlineData("Mature 17+", AgeRating.Mature17Plus)]
|
|
[InlineData("Rating Pending", AgeRating.RatingPending)]
|
|
[InlineData("X18+", AgeRating.X18Plus)]
|
|
[InlineData("Kids to Adults", AgeRating.KidsToAdults)]
|
|
[InlineData("NotValid", AgeRating.Unknown)]
|
|
public void ConvertAgeRatingToEnum_ShouldConvertCorrectly(string input, AgeRating expected)
|
|
{
|
|
Assert.Equal(expected, ComicInfo.ConvertAgeRatingToEnum(input));
|
|
}
|
|
|
|
[Fact]
|
|
public void ConvertAgeRatingToEnum_ShouldCompareCaseInsensitive()
|
|
{
|
|
Assert.Equal(AgeRating.Mature, ComicInfo.ConvertAgeRatingToEnum("mature"));
|
|
}
|
|
#endregion
|
|
}
|