mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 13:47:05 +02:00
Simple tests for Backend.FromConfig implementations
This commit is contained in:
parent
aa01ae1342
commit
c4ae2eda48
4 changed files with 61 additions and 0 deletions
|
@ -25,10 +25,18 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uploadedlobster.com/scotty/backends/maloja"
|
||||
)
|
||||
|
||||
func TestFromConfig(t *testing.T) {
|
||||
config := viper.New()
|
||||
config.Set("token", "thetoken")
|
||||
backend := maloja.MalojaApiBackend{}.FromConfig(config)
|
||||
assert.IsType(t, maloja.MalojaApiBackend{}, backend)
|
||||
}
|
||||
|
||||
func TestScrobbleToListen(t *testing.T) {
|
||||
scrobble := maloja.Scrobble{
|
||||
ListenedAt: 1699289873,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue