2019-03-13 04:14:30 -07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
2020-11-04 23:56:12 -08:00
|
|
|
func TestSpotifyStringPlayingSong(t *testing.T) {
|
|
|
|
expected := "\ue602 Candlemass - Spellbreaker"
|
|
|
|
s := &spotify{
|
|
|
|
artist: "Candlemass",
|
|
|
|
track: "Spellbreaker",
|
|
|
|
status: "playing",
|
2022-01-01 11:08:08 -08:00
|
|
|
props: properties{},
|
2020-11-04 23:56:12 -08:00
|
|
|
}
|
|
|
|
assert.Equal(t, expected, s.string())
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestSpotifyStringPausedSong(t *testing.T) {
|
|
|
|
expected := "\uF8E3 Candlemass - Spellbreaker"
|
|
|
|
s := &spotify{
|
|
|
|
artist: "Candlemass",
|
|
|
|
track: "Spellbreaker",
|
|
|
|
status: "paused",
|
2022-01-01 11:08:08 -08:00
|
|
|
props: properties{},
|
2020-11-04 23:56:12 -08:00
|
|
|
}
|
|
|
|
assert.Equal(t, expected, s.string())
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestSpotifyStringStoppedSong(t *testing.T) {
|
|
|
|
expected := "\uf04d "
|
|
|
|
s := &spotify{
|
|
|
|
artist: "Candlemass",
|
|
|
|
track: "Spellbreaker",
|
|
|
|
status: "stopped",
|
2022-01-01 11:08:08 -08:00
|
|
|
props: properties{},
|
2020-11-04 23:56:12 -08:00
|
|
|
}
|
|
|
|
assert.Equal(t, expected, s.string())
|
2019-03-13 04:14:30 -07:00
|
|
|
}
|