diff --git a/pkg/testutils/spotify/handlers.go b/pkg/testutils/spotify/handlers.go index 3a45aca..1e64b49 100644 --- a/pkg/testutils/spotify/handlers.go +++ b/pkg/testutils/spotify/handlers.go @@ -39,10 +39,10 @@ func HandleToken(w http.ResponseWriter, r *http.Request) { log.Printf("[Spotify Mock] Grant type: %s", grantType) resp := map[string]interface{}{ - "access_token": "mock-access-token", + "access_token": "spotify-access-token", "token_type": "Bearer", "expires_in": 3600, - "refresh_token": "mock-refresh-token", + "refresh_token": "spotify-refresh-token", "scope": "user-read-private user-read-email", } @@ -76,16 +76,16 @@ func HandleMe(w http.ResponseWriter, r *http.Request) { log.Printf("[Spotify Mock] Profile request: %s", r.Method) auth := r.Header.Get("Authorization") - if auth != "Bearer mock-access-token" { + if auth != "Bearer spotify-access-token" { http.Error(w, `{"error":"unauthorized"}`, http.StatusUnauthorized) return } resp := map[string]interface{}{ - "id": "mock-user-id", - "display_name": "Mock User", - "email": "mock@example.com", - "uri": "spotify:user:mock-user-id", + "id": "spotify-user-id", + "display_name": "Spotify Test User", + "email": "spotify-test@example.com", + "uri": "spotify:user:spotify-user-id", } w.Header().Set("Content-Type", "application/json") diff --git a/tests/integration/http-client/post_oauth_token.http b/tests/integration/http-client/post_oauth_token.http index 871e501..2c2bd7b 100644 --- a/tests/integration/http-client/post_oauth_token.http +++ b/tests/integration/http-client/post_oauth_token.http @@ -23,7 +23,7 @@ Content-Type: application/json client.test("Response body has expected structure", function() { client.assert(response.body.hasOwnProperty("access_token"), "Response body missing 'access_token'"); - client.assert(response.body.access_token === "mock-access-token", "access_token is not 'mock-access-token'"); + client.assert(response.body.access_token === "spotify-access-token", "access_token is not 'spotify-access-token'"); client.assert(response.body.hasOwnProperty("expires_in"), "Response body missing 'expires_in'"); client.assert(typeof response.body.expires_in === "number", "expires_in is not a number"); diff --git a/tests/integration/http-client/spotify_registration.http b/tests/integration/http-client/spotify_registration.http index 54cb004..b31a89a 100644 --- a/tests/integration/http-client/spotify_registration.http +++ b/tests/integration/http-client/spotify_registration.http @@ -25,12 +25,12 @@ Authorization: Basic admin change_me! client.assert(response.body.accounts.length > 0, "No accounts found"); var found = false; for (var i = 0; i < response.body.accounts.length; i++) { - if (response.body.accounts[i].user_id === "mock-user-id") { + if (response.body.accounts[i].user_id === "spotify-user-id") { found = true; - client.assert(response.body.accounts[i].display_name === "Mock User", "Display name mismatch"); + client.assert(response.body.accounts[i].display_name === "Spotify Test User", "Display name mismatch"); break; } } - client.assert(found, "Account 'mock-user-id' not found in " + JSON.stringify(response.body.accounts)); + client.assert(found, "Account 'spotify-user-id' not found in " + JSON.stringify(response.body.accounts)); }); %} diff --git a/tests/integration/testdata/spotify/accounts.json b/tests/integration/testdata/spotify/accounts.json deleted file mode 100644 index 08e7002..0000000 --- a/tests/integration/testdata/spotify/accounts.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "test-user": { - "user_id": "test-user", - "display_name": "Integration Test User", - "email": "test@example.com", - "access_token": "mock-access-token", - "refresh_token": "mock-refresh-token", - "expires_at": 2147483647 - } -}