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,11 +25,19 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uploadedlobster.com/scotty/backends/funkwhale"
|
||||
"go.uploadedlobster.com/scotty/models"
|
||||
)
|
||||
|
||||
func TestFromConfig(t *testing.T) {
|
||||
config := viper.New()
|
||||
config.Set("token", "thetoken")
|
||||
backend := funkwhale.FunkwhaleApiBackend{}.FromConfig(config)
|
||||
assert.IsType(t, funkwhale.FunkwhaleApiBackend{}, backend)
|
||||
}
|
||||
|
||||
func TestFunkwhaleListeningToListen(t *testing.T) {
|
||||
fwListen := funkwhale.Listening{
|
||||
CreationDate: "2023-11-09T23:59:29.022005Z",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue