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:
@@ -215,14 +215,13 @@ func TestKoboAnalyticsGettests(t *testing.T) {
|
|||||||
deviceSetup := setupDeviceTest(t)
|
deviceSetup := setupDeviceTest(t)
|
||||||
koboDevice := deviceSetup.CreateDevice(t, "Test Kobo", "kobo", "kobo-clara-analytics")
|
koboDevice := deviceSetup.CreateDevice(t, "Test Kobo", "kobo", "kobo-clara-analytics")
|
||||||
|
|
||||||
reqBody := map[string]interface{}{
|
reqBody := []map[string]interface{}{
|
||||||
"meta": map[string]string{
|
{
|
||||||
"name": "Kobo Analytics Tests",
|
"ContentId": mediaItemID,
|
||||||
|
"ReadingEvent": "Reading",
|
||||||
|
"RemainingTimeMin": 180,
|
||||||
|
"PercentRead": 67.8,
|
||||||
},
|
},
|
||||||
"ContentId": mediaItemID,
|
|
||||||
"ReadingEvent": "Reading",
|
|
||||||
"RemainingTimeMin": 180,
|
|
||||||
"PercentRead": 67.8,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body, _ := json.Marshal(reqBody)
|
body, _ := json.Marshal(reqBody)
|
||||||
|
|||||||
Reference in New Issue
Block a user