Moved specifc backends into separate packages

This commit is contained in:
Philipp Wolfer 2023-11-12 01:14:53 +01:00
parent dfaf21b234
commit 48c8843f91
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
17 changed files with 127 additions and 98 deletions

View file

@ -34,7 +34,7 @@ import (
func TestNewClient(t *testing.T) {
serverUrl := "https://funkwhale.example.com"
token := "foobar123"
client := funkwhale.New(serverUrl, token)
client := funkwhale.NewClient(serverUrl, token)
assert.Equal(t, serverUrl, client.HttpClient.BaseURL)
assert.Equal(t, token, client.HttpClient.Token)
}
@ -44,7 +44,7 @@ func TestGetHistoryListenings(t *testing.T) {
token := "thetoken"
serverUrl := "https://funkwhale.example.com"
client := funkwhale.New(serverUrl, token)
client := funkwhale.NewClient(serverUrl, token)
setupHttpMock(t, client.HttpClient.GetClient(),
"https://funkwhale.example.com/api/v1/history/listenings",
"testdata/listenings.json")