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

Function TestPlayPathSuccess

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

Source from the content-addressed store, hash-verified

36}
37
38func 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
61func TestPlayPathInvalidPath(t *testing.T) {
62 m := new(mocks.Client)

Callers

nothing calls this directly

Calls 1

PlayPathFunction · 0.85

Tested by

no test coverage detected