Esempio n. 1
0
func assertNoNextTrack(events *sconsify.Events, finished chan bool) {
	events.NextPlay()

	// playing spotify shutdown here
	<-events.ShutdownSpotifyUpdates()
	events.ShutdownEngine()

	<-finished
}
Esempio n. 2
0
func playNext(t *testing.T, events *sconsify.Events, output *TestPrinter, tracks []string) {
	for _, track := range tracks {
		events.NextPlay()
		events.TrackPlaying(<-events.PlayUpdates())
		message := <-output.message
		expectedMessage := fmt.Sprintf("Playing: artist%v - name%v [duration%v]", track, track, track)
		if message != expectedMessage {
			t.Errorf("Should be showing track%v instead is showing [%v]", track, message)
		}
	}
}