mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 21:57:06 +02:00
JSPF loves export
This commit is contained in:
parent
dcb5e9c2c6
commit
1f2d5f662d
4 changed files with 131 additions and 0 deletions
|
@ -21,3 +21,21 @@ THE SOFTWARE.
|
|||
*/
|
||||
|
||||
package jspf_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uploadedlobster.com/scotty/backends/scrobblerlog"
|
||||
)
|
||||
|
||||
func TestFromConfig(t *testing.T) {
|
||||
config := viper.New()
|
||||
config.Set("file-path", "/foo/bar.jspf")
|
||||
config.Set("title", "My Playlist")
|
||||
config.Set("username", "outsidecontext")
|
||||
config.Set("identifier", "http://example.com/playlist1")
|
||||
backend := scrobblerlog.ScrobblerLogBackend{}.FromConfig(config)
|
||||
assert.IsType(t, scrobblerlog.ScrobblerLogBackend{}, backend)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue