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

Function TestSpotify_IsConfigured

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

Source from the content-addressed store, hash-verified

266}
267
268func TestSpotify_IsConfigured(t *testing.T) {
269 s := NewSpotify()
270
271 // Since ClientId and ClientSecret are optional (not required),
272 // IsConfigured() returns true even when empty
273 // This is by design - Spotify is an optional plugin
274 if !s.IsConfigured() {
275 t.Error("NewSpotify() should be configured (optional settings are valid when empty)")
276 }
277
278 // Set credentials - should still be configured
279 s.ClientId.Value = "test_client_id"
280 s.ClientSecret.Value = "test_client_secret"
281
282 if !s.IsConfigured() {
283 t.Error("Spotify should be configured after setting credentials")
284 }
285}
286
287func TestSpotify_HasCredentials(t *testing.T) {
288 s := NewSpotify()

Callers

nothing calls this directly

Calls 3

NewSpotifyFunction · 0.85
ErrorMethod · 0.80
IsConfiguredMethod · 0.65

Tested by

no test coverage detected