client: finalize SDK tests
package client_test
import (
+ "net/http"
"net/http/httptest"
+ "testing"
+
+ "github.com/julienschmidt/httprouter"
"github.com/ory/fosite"
- "github.com/ory/ladon"
"github.com/ory/herodot"
- "github.com/julienschmidt/httprouter"
- "testing"
- "github.com/ory/hydra/compose"
"github.com/ory/hydra/client"
+ "github.com/ory/hydra/compose"
hydra "github.com/ory/hydra/sdk/go/swagger"
+ "github.com/ory/ladon"
+ "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/oauth2"
- "github.com/stretchr/testify/assert"
- "net/http"
)
func createTestClient(prefix string) hydra.OauthClient {
@@ -71,7 +72,10 @@ func TestClientSDK(t *testing.T) {
result, _, err = c.GetOAuthClient(createClient.Id)
assert.EqualValues(t, compareClient, *result)
- //results, _, err := c.ListOAuthClients()
+ results, _, err := c.ListOAuthClients()
+ require.NoError(t, err)
+ assert.Len(t, results, 1)
+ assert.EqualValues(t, compareClient, results[0])
updateClient := createTestClient("foo")
result, _, err = c.UpdateOAuthClient(createClient.Id, updateClient)
