From 45dab8b253a1369733d9a7e39355277a644d2b14 Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Wed, 3 Jun 2026 07:00:49 +0330 Subject: [PATCH] test: update ReportPlanGate test for maxDays signature Co-Authored-By: Claude Opus 4.8 --- tests/Meezi.API.Tests/DailyReportServiceTests.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Meezi.API.Tests/DailyReportServiceTests.cs b/tests/Meezi.API.Tests/DailyReportServiceTests.cs index 8c81553..2c164d0 100644 --- a/tests/Meezi.API.Tests/DailyReportServiceTests.cs +++ b/tests/Meezi.API.Tests/DailyReportServiceTests.cs @@ -196,8 +196,9 @@ public class DailyReportServiceTests public void ReportPlanGate_Free_AllowsEightDayWindow() { var today = new DateOnly(2026, 5, 21); - Assert.True(ReportPlanGate.IsDateInRange(PlanTier.Free, today, today)); - Assert.True(ReportPlanGate.IsDateInRange(PlanTier.Free, today.AddDays(-7), today)); - Assert.False(ReportPlanGate.IsDateInRange(PlanTier.Free, today.AddDays(-8), today)); + const int freeMaxDays = 8; // Free plan's report-history window + Assert.True(ReportPlanGate.IsDateInRange(freeMaxDays, today, today)); + Assert.True(ReportPlanGate.IsDateInRange(freeMaxDays, today.AddDays(-7), today)); + Assert.False(ReportPlanGate.IsDateInRange(freeMaxDays, today.AddDays(-8), today)); } }