fix: correct TestKoboAnalyticsGettests request format to match handler

The test was sending a single object with a "meta" field, but the handler
expects an array of KoboAnalyticsTest objects (matching other Kobo endpoints).

Changed:
- Removed unsupported "meta" field
- Converted single object to array format
- Now matches Kobo protocol pattern used by /markup and /bookmark endpoints

All Kobo tests now pass:
- TestKoboInitialization 
- TestKoboLibrarySync 
- TestKoboMarkupSync 
- TestKoboBookmarkSync 
- TestKoboAnalyticsGettests 
- TestKoboDeviceHeaderParsing 
This commit is contained in:
2026-02-10 18:30:36 -05:00
parent 7dcc70b448
commit f72c552241
+6 -7
View File
@@ -215,14 +215,13 @@ func TestKoboAnalyticsGettests(t *testing.T) {
deviceSetup := setupDeviceTest(t)
koboDevice := deviceSetup.CreateDevice(t, "Test Kobo", "kobo", "kobo-clara-analytics")
reqBody := map[string]interface{}{
"meta": map[string]string{
"name": "Kobo Analytics Tests",
reqBody := []map[string]interface{}{
{
"ContentId": mediaItemID,
"ReadingEvent": "Reading",
"RemainingTimeMin": 180,
"PercentRead": 67.8,
},
"ContentId": mediaItemID,
"ReadingEvent": "Reading",
"RemainingTimeMin": 180,
"PercentRead": 67.8,
}
body, _ := json.Marshal(reqBody)