Fix tests part 2

pull/4322/head
tidusjar 3 years ago
parent df2238a4b6
commit 5fee6d4686

@ -112,7 +112,7 @@ namespace Ombi.Core.Tests.Engine
MovieRequestLimit = 2,
Id = "id1"
};
var yesterday = DateTime.Now.AddDays(-1);
var yesterday = new DateTime(2020, 10, 05).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -145,7 +145,7 @@ namespace Ombi.Core.Tests.Engine
MovieRequestLimit = 2,
Id = "id1"
};
var yesterday = DateTime.Now.AddDays(-1);
var yesterday = new DateTime(2020, 10, 05).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -220,7 +220,7 @@ namespace Ombi.Core.Tests.Engine
MovieRequestLimitType = RequestLimitType.Day,
Id = "id1"
};
var yesterday = DateTime.Now.AddDays(-1);
var yesterday = new DateTime(2020, 10, 05).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -253,7 +253,7 @@ namespace Ombi.Core.Tests.Engine
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -286,7 +286,7 @@ namespace Ombi.Core.Tests.Engine
MovieRequestLimitType = RequestLimitType.Day,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -325,7 +325,7 @@ namespace Ombi.Core.Tests.Engine
MovieRequestLimitType = RequestLimitType.Week,
Id = "id1"
};
var lastWeek = DateTime.Now.FirstDateInWeek().AddDays(-1); // Day before reset
var lastWeek = new DateTime(2020, 10, 05).FirstDateInWeek().AddDays(-1); // Day before reset
var log = new List<RequestLog>
{
new RequestLog
@ -390,7 +390,7 @@ namespace Ombi.Core.Tests.Engine
MovieRequestLimitType = RequestLimitType.Week,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2021,10,05);
var log = new List<RequestLog>
{
new RequestLog
@ -428,7 +428,7 @@ namespace Ombi.Core.Tests.Engine
MovieRequestLimitType = RequestLimitType.Month,
Id = "id1"
};
var lastWeek = DateTime.Now.AddMonths(-1).AddDays(-1);
var lastWeek = new DateTime(2020, 10, 05).AddMonths(-1).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -460,7 +460,7 @@ namespace Ombi.Core.Tests.Engine
MovieRequestLimitType = RequestLimitType.Month,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var firstDayOfMonth = new DateTime(today.Year, today.Month, 1);
var log = new List<RequestLog>
{
@ -494,7 +494,7 @@ namespace Ombi.Core.Tests.Engine
MovieRequestLimitType = RequestLimitType.Month,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var firstDayOfMonth = new DateTime(today.Year, today.Month, 1);
var log = new List<RequestLog>
{

@ -112,7 +112,7 @@ namespace Ombi.Core.Tests.Engine
MusicRequestLimit = 2,
Id = "id1"
};
var yesterday = DateTime.Now.AddDays(-1);
var yesterday = new DateTime(2020, 10, 05).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -145,7 +145,7 @@ namespace Ombi.Core.Tests.Engine
MusicRequestLimit = 2,
Id = "id1"
};
var yesterday = DateTime.Now.AddDays(-1);
var yesterday = new DateTime(2020, 10, 05).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -220,7 +220,7 @@ namespace Ombi.Core.Tests.Engine
MusicRequestLimitType = RequestLimitType.Day,
Id = "id1"
};
var yesterday = DateTime.Now.AddDays(-1);
var yesterday = new DateTime(2020, 10, 05).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -253,7 +253,7 @@ namespace Ombi.Core.Tests.Engine
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -286,7 +286,7 @@ namespace Ombi.Core.Tests.Engine
MusicRequestLimitType = RequestLimitType.Day,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -325,7 +325,7 @@ namespace Ombi.Core.Tests.Engine
MusicRequestLimitType = RequestLimitType.Week,
Id = "id1"
};
var lastWeek = DateTime.Now.FirstDateInWeek().AddDays(-1); // Day before reset
var lastWeek = new DateTime(2020, 10, 05).FirstDateInWeek().AddDays(-1); // Day before reset
var log = new List<RequestLog>
{
new RequestLog
@ -390,7 +390,7 @@ namespace Ombi.Core.Tests.Engine
MusicRequestLimitType = RequestLimitType.Week,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -428,7 +428,7 @@ namespace Ombi.Core.Tests.Engine
MusicRequestLimitType = RequestLimitType.Month,
Id = "id1"
};
var lastWeek = DateTime.Now.AddMonths(-1).AddDays(-1);
var lastWeek = new DateTime(2020, 10, 05).AddMonths(-1).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -460,7 +460,7 @@ namespace Ombi.Core.Tests.Engine
MusicRequestLimitType = RequestLimitType.Month,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var firstDayOfMonth = new DateTime(today.Year, today.Month, 1);
var log = new List<RequestLog>
{
@ -494,7 +494,7 @@ namespace Ombi.Core.Tests.Engine
MusicRequestLimitType = RequestLimitType.Month,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var firstDayOfMonth = new DateTime(today.Year, today.Month, 1);
var log = new List<RequestLog>
{

@ -109,7 +109,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimit = 2,
Id = "id1"
};
var yesterday = DateTime.Now.AddDays(-1);
var yesterday = new DateTime(2020, 10, 05).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -142,7 +142,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimit = 2,
Id = "id1"
};
var yesterday = DateTime.Now.AddDays(-1);
var yesterday = new DateTime(2020, 10, 05).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -225,7 +225,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Day,
Id = "id1"
};
var yesterday = DateTime.Now.AddDays(-1);
var yesterday = new DateTime(2020, 10, 05).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -258,7 +258,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Day,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -292,7 +292,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Day,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -333,7 +333,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Day,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -407,7 +407,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Week,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -441,7 +441,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Week,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -482,7 +482,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Week,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -523,7 +523,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Month,
Id = "id1"
};
var lastWeek = DateTime.Now.AddMonths(-1).AddDays(-1);
var lastWeek = new DateTime(2020, 10, 05).AddMonths(-1).AddDays(-1);
var log = new List<RequestLog>
{
new RequestLog
@ -556,7 +556,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Month,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -590,7 +590,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Month,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog
@ -631,7 +631,7 @@ namespace Ombi.Core.Tests.Engine
EpisodeRequestLimitType = RequestLimitType.Month,
Id = "id1"
};
var today = DateTime.Now;
var today = new DateTime(2020, 10, 05);
var log = new List<RequestLog>
{
new RequestLog

Loading…
Cancel
Save