test: avoid nil response in connect play fallback test

This commit is contained in:
Peter Steinberger 2026-05-05 06:32:23 +01:00
parent e4d88648a8
commit 5562000ed0
No known key found for this signature in database

View File

@ -2,6 +2,7 @@ package spotify
import (
"context"
"errors"
"io"
"net/http"
"strings"
@ -214,7 +215,7 @@ func TestConnectPlayFallsBackToWebAPIWithoutActiveDevice(t *testing.T) {
return textResponse(http.StatusNoContent, ""), nil
case req.Method == http.MethodPost:
t.Fatalf("unexpected connect command: %s", req.URL.Path)
return nil, nil
return nil, errors.New("unexpected connect command")
default:
return textResponse(http.StatusNotFound, "missing"), nil
}