(m Manager)
| 65 | } |
| 66 | |
| 67 | func 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 | |
| 81 | func testHelperUpdateClient(t *testing.T, ctx context.Context, store Storage, toUpdate *Client) { |
| 82 | require.NoError(t, store.UpdateClient(ctx, &Client{ |
no test coverage detected