aboutsummaryrefslogtreecommitdiff
path: root/ride/store_test.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-08-28 22:38:57 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-08-28 22:38:57 +0200
commit827b55f610119d553b965ceb4d3631f0481bbb3b (patch)
treedf00788440edc234c9d15adc9e49100704675130 /ride/store_test.go
parentff57ebcbe4949b7b53e7c42ecc7916b601a67213 (diff)
Rename rides.type to external_sport_type, infer bike type from Strava sport type and display categories in UI
Diffstat (limited to 'ride/store_test.go')
-rw-r--r--ride/store_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/ride/store_test.go b/ride/store_test.go
index 1fca056..a629798 100644
--- a/ride/store_test.go
+++ b/ride/store_test.go
@@ -35,7 +35,7 @@ func sampleRide(t *testing.T) StoredRide {
GPXPath: gpxPath,
FitPath: fitPath,
Name: "Morning Ride",
- Type: "Ride",
+ ExternalSportType: "Ride",
StartDate: time.Date(2026, 8, 1, 7, 30, 0, 0, time.UTC),
DistanceM: 42_195,
ExternalMovingTimeS: 7_200,
@@ -225,7 +225,7 @@ func TestBackfillReportsProgress(t *testing.T) {
func TestBackfillSkipsInvalidRide(t *testing.T) {
db := newTestDB(t)
_, err := db.Exec(`
- INSERT INTO rides (external_id, gpx_path, name, type, start_date, distance_m, external_moving_time_s, elapsed_time_s, total_elevation_gain_m, average_speed_mps)
+ INSERT INTO rides (external_id, gpx_path, name, external_sport_type, start_date, distance_m, external_moving_time_s, elapsed_time_s, total_elevation_gain_m, average_speed_mps)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
`, "strava:550e8400-e29b-41d4-a716-446655440000", "missing.gpx", "Broken Ride", "Ride", "2026-08-01T07:00:00Z", 20_000, 0, 0, 0, 0)
require.NoError(t, err)