(t *testing.T)
| 285 | } |
| 286 | |
| 287 | func 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 | } |
nothing calls this directly
no test coverage detected