fix(server/api): silence unused-parameter lint in resolve_test fakes
This commit is contained in:
@@ -26,7 +26,7 @@ func reqWithParam(_ *testing.T, key, value string) *http.Request {
|
|||||||
|
|
||||||
func TestResolveByID_InvalidUUID(t *testing.T) {
|
func TestResolveByID_InvalidUUID(t *testing.T) {
|
||||||
called := 0
|
called := 0
|
||||||
fetch := func(ctx context.Context, id pgtype.UUID) (fakeRow, error) {
|
fetch := func(_ context.Context, _ pgtype.UUID) (fakeRow, error) {
|
||||||
called++
|
called++
|
||||||
return fakeRow{}, nil
|
return fakeRow{}, nil
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ func TestResolveByID_InvalidUUID(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestResolveByID_NotFound(t *testing.T) {
|
func TestResolveByID_NotFound(t *testing.T) {
|
||||||
fetch := func(ctx context.Context, id pgtype.UUID) (fakeRow, error) {
|
fetch := func(_ context.Context, _ pgtype.UUID) (fakeRow, error) {
|
||||||
return fakeRow{}, pgx.ErrNoRows
|
return fakeRow{}, pgx.ErrNoRows
|
||||||
}
|
}
|
||||||
r := reqWithParam(t, "id", "11111111-1111-1111-1111-111111111111")
|
r := reqWithParam(t, "id", "11111111-1111-1111-1111-111111111111")
|
||||||
@@ -65,7 +65,7 @@ func TestResolveByID_NotFound(t *testing.T) {
|
|||||||
|
|
||||||
func TestResolveByID_Internal(t *testing.T) {
|
func TestResolveByID_Internal(t *testing.T) {
|
||||||
cause := errors.New("boom")
|
cause := errors.New("boom")
|
||||||
fetch := func(ctx context.Context, id pgtype.UUID) (fakeRow, error) {
|
fetch := func(_ context.Context, _ pgtype.UUID) (fakeRow, error) {
|
||||||
return fakeRow{}, cause
|
return fakeRow{}, cause
|
||||||
}
|
}
|
||||||
r := reqWithParam(t, "id", "11111111-1111-1111-1111-111111111111")
|
r := reqWithParam(t, "id", "11111111-1111-1111-1111-111111111111")
|
||||||
@@ -83,7 +83,7 @@ func TestResolveByID_Internal(t *testing.T) {
|
|||||||
|
|
||||||
func TestResolveByID_Success(t *testing.T) {
|
func TestResolveByID_Success(t *testing.T) {
|
||||||
want := fakeRow{Name: "alpha"}
|
want := fakeRow{Name: "alpha"}
|
||||||
fetch := func(ctx context.Context, id pgtype.UUID) (fakeRow, error) {
|
fetch := func(_ context.Context, id pgtype.UUID) (fakeRow, error) {
|
||||||
want.ID = id
|
want.ID = id
|
||||||
return want, nil
|
return want, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user