mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 19:40:05 -07:00
test: ✅ Fixed tests
This commit is contained in:
parent
5fee6d4686
commit
c35ac16e19
4 changed files with 36 additions and 36 deletions
|
@ -153,7 +153,7 @@ namespace Ombi.Core.Services
|
|||
nextRequest = oldestRequestedAt.AddDays(1).Date;
|
||||
break;
|
||||
case RequestLimitType.Week:
|
||||
var fdow = DateTime.UtcNow.FirstDateInWeek();
|
||||
var fdow = DateTime.UtcNow.FirstDateInWeek().Date;
|
||||
count = limit - await log.CountAsync(x => x.RequestDate >= fdow);
|
||||
oldestRequestedAt = await log.Where(x => x.RequestDate >= fdow)
|
||||
.OrderBy(x => x.RequestDate)
|
||||
|
@ -262,7 +262,7 @@ namespace Ombi.Core.Services
|
|||
nextRequest = oldestRequestedAt.AddDays(1).Date;
|
||||
break;
|
||||
case RequestLimitType.Week:
|
||||
var fdow = now.FirstDateInWeek();
|
||||
var fdow = now.FirstDateInWeek().Date;
|
||||
filteredLog = log.Where(x => x.RequestDate >= DateTime.UtcNow.Date.AddDays(-7));
|
||||
// Needed, due to a bug which would cause all episode counts to be 0
|
||||
zeroEpisodeCount = await filteredLog.Where(x => x.EpisodeCount == 0).Select(x => x.EpisodeCount).CountAsync();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue