Bugfixes + Potential iOS Webtoon Reader Fix (#2650)

This commit is contained in:
Joe Milazzo 2024-01-25 11:09:44 -06:00 committed by GitHub
parent 56fa393cf0
commit f660a1cd06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 157 additions and 197 deletions

View file

@ -1,18 +1,20 @@
using API.Helpers.Converters;
using Hangfire;
using Xunit;
namespace API.Tests.Converters;
#nullable enable
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("0 0 31 2 *", "0 0 31 2 *")]
[InlineData("sdfgdf", "sdfgdf")]
[InlineData("* * * * *", "* * * * *")]
public void ConvertTest(string input, string expected)
[InlineData(null, "0 0 * * *")] // daily
public void ConvertTest(string? input, string expected)
{
Assert.Equal(expected, CronConverter.ConvertToCronNotation(input));
}