mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-06-23 15:30:34 -04:00
* Added a lot of tests * More tests! Added a Parser.NormalizePath to normalize all paths within Kavita. * Fixed a bug where MarkChaptersAsUnread implementation wasn't consistent between different files and lead to extra row generation for no reason. * Added more unit tests * Found a better implementation for Natural Sorting. Added tests and validate it works. Next commit will swap out natural Sort for new Extension. * Replaced NaturalSortComparer with OrderByNatural. * Drastically simplified and sped up FindFirstEntry for finding cover images in archives * Initial fix for a epub bug where metadata defines key as absolute path but document uses a relative path. We now have a hack to correct for the epub.
20 lines
518 B
C#
20 lines
518 B
C#
using API.Helpers.Converters;
|
|
using Xunit;
|
|
|
|
namespace API.Tests.Converters
|
|
{
|
|
public class CronConverterTests
|
|
{
|
|
[Theory]
|
|
[InlineData("daily", "0 0 * * *")]
|
|
[InlineData("disabled", "0 0 31 2 *")]
|
|
[InlineData("weekly", "0 0 * * 1")]
|
|
[InlineData("", "0 0 31 2 *")]
|
|
[InlineData("sdfgdf", "")]
|
|
public void ConvertTest(string input, string expected)
|
|
{
|
|
Assert.Equal(expected, CronConverter.ConvertToCronNotation(input));
|
|
}
|
|
}
|
|
}
|