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

Function TestPlayUrPlayerDevicesError

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

Source from the content-addressed store, hash-verified

79}
80
81func TestPlayUrPlayerDevicesError(t *testing.T) {
82 viper.Set("spotify.device_name", "test_device_name")
83
84 m := new(mocks.Client)
85 var ds []spotify.PlayerDevice
86
87 const e string = "PlayerDevices error"
88
89 m.On("PlayerDevices").Return(ds, errors.New(e))
90 err := PlayUri(m, "dummy_uri")
91 assert.EqualError(t, err, e)
92}
93
94func TestPlayUriDeviceNotFoundError(t *testing.T) {
95 const n = "test_device_name"

Callers

nothing calls this directly

Calls 1

PlayUriFunction · 0.85

Tested by

no test coverage detected