Unified code for backend clients and tests

This commit is contained in:
Philipp Wolfer 2023-11-12 16:28:23 +01:00
parent 9316838d59
commit aa01ae1342
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
11 changed files with 220 additions and 42 deletions

View file

@ -42,8 +42,8 @@ func TestNewClient(t *testing.T) {
func TestGetHistoryListenings(t *testing.T) {
defer httpmock.DeactivateAndReset()
token := "thetoken"
serverUrl := "https://funkwhale.example.com"
token := "thetoken"
client := funkwhale.NewClient(serverUrl, token)
setupHttpMock(t, client.HttpClient.GetClient(),
"https://funkwhale.example.com/api/v1/history/listenings",