(t *testing.T)
| 22 | } |
| 23 | |
| 24 | func TestRealDiskplayerServer_RunCallbackServer(t *testing.T) { |
| 25 | viper.Set("spotify.callback_url", "http://localhost:8732/callback") |
| 26 | a := &spotify.Authenticator{} |
| 27 | ch := make(chan *oauth2.Token, 1) |
| 28 | ds := NewDiskplayerServer(a, ch) |
| 29 | viper.Set("recorder.server_port", 4389) |
| 30 | s, err := ds.RunCallbackServer() |
| 31 | assert.NoError(t,err) |
| 32 | ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) |
| 33 | defer cancel() |
| 34 | err = s.Shutdown(ctx) |
| 35 | assert.NoError(t,err) |
| 36 | } |
| 37 | |
| 38 | func TestErrorHandler(t *testing.T) { |
| 39 | rr := httptest.NewRecorder() |
nothing calls this directly
no test coverage detected