MCPcopy Create free account
hub / github.com/dinofizz/diskplayer / TestPauseDeviceNotFound

Function TestPauseDeviceNotFound

diskplayer_test.go:283–304  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

281}
282
283func TestPauseDeviceNotFound(t *testing.T) {
284 const n = "test_device_name"
285 viper.Set("spotify.device_name", n)
286
287 m := new(mocks.Client)
288
289 ds := []spotify.PlayerDevice{
290 {
291 ID: "ANOTHER_TEST_ID",
292 Active: true,
293 Restricted: false,
294 Name: "another_device_name",
295 Type: "",
296 Volume: 0,
297 },
298 }
299
300 m.On("PlayerDevices").Return(ds, nil)
301
302 err := Pause(m)
303 assert.EqualError(t, err, fmt.Sprintf("client identified by %s not found", n))
304}
305
306func TestPausePlayerDevicesError(t *testing.T) {
307 viper.Set("spotify.device_name", "test_device_name")

Callers

nothing calls this directly

Calls 1

PauseFunction · 0.85

Tested by

no test coverage detected