aboutsummaryrefslogtreecommitdiff
path: root/web/ride-filters_test.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-08-21 06:56:12 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-08-21 06:56:12 +0200
commit9da52d7355f5a77f0adc9a658619b3bfef03ba3c (patch)
treeb9e5f803d0c9787a84696b9e38b06b6721c9ded3 /web/ride-filters_test.go
parent13aeedfbb9271444ca42efb45bbe0986ae7610ce (diff)
feat(ride): persist canonical moving time, preserve Strava reference
Diffstat (limited to 'web/ride-filters_test.go')
-rw-r--r--web/ride-filters_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/ride-filters_test.go b/web/ride-filters_test.go
index c7b9133..8b470b6 100644
--- a/web/ride-filters_test.go
+++ b/web/ride-filters_test.go
@@ -89,11 +89,11 @@ func TestParseRideFiltersTreatsFullRangesAsInactive(t *testing.T) {
func TestFilterRidesUsesInclusiveBoundsAndMovingTime(t *testing.T) {
items := []rides.Ride{
- {Name: "lower boundary", DistanceM: 20_000, MovingTimeS: 1_800, StartDate: time.Date(2026, 8, 1, 12, 0, 0, 0, time.UTC), GPXPath: "lower.gpx"},
- {Name: "upper boundary", DistanceM: 100_000, MovingTimeS: 10_800, StartDate: time.Date(2026, 8, 31, 12, 0, 0, 0, time.UTC), GPXPath: "upper.gpx"},
- {Name: "outside distance", DistanceM: 110_000, MovingTimeS: 10_800, StartDate: time.Date(2026, 8, 31, 12, 0, 0, 0, time.UTC), GPXPath: "outside-distance.gpx"},
- {Name: "outside moving time", DistanceM: 100_000, MovingTimeS: 10_801, StartDate: time.Date(2026, 8, 31, 12, 0, 0, 0, time.UTC), GPXPath: "outside-duration.gpx"},
- {Name: "outside date", DistanceM: 100_000, MovingTimeS: 10_800, StartDate: time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC), GPXPath: "outside-date.gpx"},
+ {Name: "lower boundary", DistanceM: 20_000, ExternalMovingTimeS: 1_800, StartDate: time.Date(2026, 8, 1, 12, 0, 0, 0, time.UTC), GPXPath: "lower.gpx"},
+ {Name: "upper boundary", DistanceM: 100_000, ExternalMovingTimeS: 10_800, StartDate: time.Date(2026, 8, 31, 12, 0, 0, 0, time.UTC), GPXPath: "upper.gpx"},
+ {Name: "outside distance", DistanceM: 110_000, ExternalMovingTimeS: 10_800, StartDate: time.Date(2026, 8, 31, 12, 0, 0, 0, time.UTC), GPXPath: "outside-distance.gpx"},
+ {Name: "outside moving time", DistanceM: 100_000, ExternalMovingTimeS: 10_801, StartDate: time.Date(2026, 8, 31, 12, 0, 0, 0, time.UTC), GPXPath: "outside-duration.gpx"},
+ {Name: "outside date", DistanceM: 100_000, ExternalMovingTimeS: 10_800, StartDate: time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC), GPXPath: "outside-date.gpx"},
}
filters := parseRideFilters(url.Values{
rideFilterDistanceMinParam: {"20"},