fix_trial

This commit is contained in:
hangyu.tao 2026-01-16 19:04:44 +08:00
parent 8cbad66b32
commit c8f6341bc9

View File

@ -27,7 +27,7 @@ func TestUpdateTrialPeriodWithIsTrial(t *testing.T) {
endTime := now.Add(7 * 24 * time.Hour)
trialPeriod := models.TrialPeriod{
CustomerID: "test-customer-001",
CustomerName: "test-customer-001",
StartTime: startTime,
EndTime: endTime,
IsTrial: true,
@ -111,7 +111,7 @@ func TestUpdateTrialPeriodWithStartEndTime(t *testing.T) {
endTime := now.Add(7 * 24 * time.Hour)
trialPeriod := models.TrialPeriod{
CustomerID: "test-customer-002",
CustomerName: "test-customer-002",
StartTime: startTime,
EndTime: endTime,
IsTrial: true,
@ -190,7 +190,7 @@ func TestGetAllTrialPeriods(t *testing.T) {
now := time.Now()
for i := 0; i < 3; i++ {
trialPeriod := models.TrialPeriod{
CustomerID: "test-customer-bulk",
CustomerName: "test-customer-bulk",
StartTime: now.Add(time.Duration(i) * 24 * time.Hour),
EndTime: now.Add(time.Duration(i+7) * 24 * time.Hour),
IsTrial: i%2 == 0, // Alternate true/false
@ -235,7 +235,7 @@ func TestDeleteTrialPeriod(t *testing.T) {
// Create a trial period
now := time.Now()
trialPeriod := models.TrialPeriod{
CustomerID: "test-customer-delete",
CustomerName: "test-customer-delete",
StartTime: now,
EndTime: now.Add(7 * 24 * time.Hour),
IsTrial: true,