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

Function TestPlayUriDeviceNotFoundError

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

Source from the content-addressed store, hash-verified

92}
93
94func TestPlayUriDeviceNotFoundError(t *testing.T) {
95 const n = "test_device_name"
96 viper.Set("spotify.device_name", n)
97
98 m := new(mocks.Client)
99
100 d := spotify.PlayerDevice{
101 ID: "TEST_ID",
102 Active: false,
103 Restricted: false,
104 Name: "another_device_name",
105 Type: "",
106 Volume: 0,
107 }
108
109 ds := []spotify.PlayerDevice{d}
110
111 m.On("PlayerDevices").Return(ds, nil)
112
113 err := PlayUri(m, "foobar")
114 assert.EqualError(t, err, fmt.Sprintf("client identified by %s not found", n))
115}
116
117func TestPlayUriTransferPlaybackSuccess(t *testing.T) {
118 const n = "test_device_name"

Callers

nothing calls this directly

Calls 1

PlayUriFunction · 0.85

Tested by

no test coverage detected