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

Function TestPauseError

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

Source from the content-addressed store, hash-verified

317}
318
319func TestPauseError(t *testing.T) {
320 const n = "test_device_name"
321 viper.Set("spotify.device_name", n)
322
323 m := new(mocks.Client)
324
325 ds := []spotify.PlayerDevice{
326 {
327 ID: "TEST_ID",
328 Active: true,
329 Restricted: false,
330 Name: n,
331 Type: "",
332 Volume: 0,
333 },
334 }
335
336 m.On("PlayerDevices").Return(ds, nil)
337 const e = "pause error"
338 m.On("Pause").Return(errors.New(e))
339
340 err := Pause(m)
341 assert.EqualError(t, err, e)
342}

Callers

nothing calls this directly

Calls 1

PauseFunction · 0.85

Tested by

no test coverage detected