MCPcopy
hub / github.com/danielmiessler/Fabric / TestSpotify_HasCredentials

Function TestSpotify_HasCredentials

internal/tools/spotify/spotify_test.go:287–306  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

285}
286
287func TestSpotify_HasCredentials(t *testing.T) {
288 s := NewSpotify()
289
290 // Without credentials, attempting to use the API should fail
291 // This tests the actual validation in refreshAccessToken
292 if s.ClientId.Value != "" || s.ClientSecret.Value != "" {
293 t.Error("NewSpotify() should have empty credentials initially")
294 }
295
296 // Set credentials
297 s.ClientId.Value = "test_client_id"
298 s.ClientSecret.Value = "test_client_secret"
299
300 if s.ClientId.Value != "test_client_id" {
301 t.Error("ClientId should be set")
302 }
303 if s.ClientSecret.Value != "test_client_secret" {
304 t.Error("ClientSecret should be set")
305 }
306}

Callers

nothing calls this directly

Calls 2

NewSpotifyFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected