(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func TestPlayPathSuccess(t *testing.T) { |
| 39 | viper.Set("spotify.device_name", "test_device_name") |
| 40 | |
| 41 | m := new(mocks.Client) |
| 42 | |
| 43 | d := spotify.PlayerDevice{ |
| 44 | ID: "TEST_ID", |
| 45 | Active: false, |
| 46 | Restricted: false, |
| 47 | Name: "test_device_name", |
| 48 | Type: "", |
| 49 | Volume: 0, |
| 50 | } |
| 51 | |
| 52 | ds := []spotify.PlayerDevice{d} |
| 53 | |
| 54 | m.On("PlayerDevices").Return(ds, nil) |
| 55 | m.On("PlayOpt", mock.AnythingOfType("*spotify.PlayOptions")).Return(nil) |
| 56 | |
| 57 | err := PlayPath(m, "./test-fixtures/diskplayer.contents") |
| 58 | assert.NoError(t, err) |
| 59 | } |
| 60 | |
| 61 | func TestPlayPathInvalidPath(t *testing.T) { |
| 62 | m := new(mocks.Client) |
nothing calls this directly
no test coverage detected