MCPcopy
hub / github.com/ory/hydra / TestHelperUpdateTwoClients

Function TestHelperUpdateTwoClients

client/manager_test_helpers.go:67–79  ·  view source on GitHub ↗
(m Manager)

Source from the content-addressed store, hash-verified

65}
66
67func TestHelperUpdateTwoClients(m Manager) func(t *testing.T) {
68 return func(t *testing.T) {
69 c1, c2 := &Client{Name: "test client 1"}, &Client{Name: "test client 2"}
70
71 require.NoError(t, m.CreateClient(context.Background(), c1))
72 require.NoError(t, m.CreateClient(context.Background(), c2))
73
74 c1.Name, c2.Name = "updated client 1", "updated client 2"
75
76 assert.NoError(t, m.UpdateClient(context.Background(), c1))
77 assert.NoError(t, m.UpdateClient(context.Background(), c2))
78 }
79}
80
81func testHelperUpdateClient(t *testing.T, ctx context.Context, store Storage, toUpdate *Client) {
82 require.NoError(t, store.UpdateClient(ctx, &Client{

Callers 1

testRegistryFunction · 0.92

Calls 2

CreateClientMethod · 0.65
UpdateClientMethod · 0.65

Tested by

no test coverage detected