(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func Test_userKeysForUser(t *testing.T) { |
| 56 | reg := &httpmock.Registry{} |
| 57 | defer reg.Verify(t) |
| 58 | reg.Register( |
| 59 | httpmock.QueryMatcher("GET", "users/monalisa/gpg_keys", url.Values{"per_page": []string{"100"}}), |
| 60 | httpmock.StringResponse(`[{"key_id":"ABC123"}]`), |
| 61 | ) |
| 62 | |
| 63 | keys, err := userKeys(&http.Client{Transport: reg}, "github.com", "monalisa") |
| 64 | |
| 65 | require.NoError(t, err) |
| 66 | require.Len(t, keys, 1) |
| 67 | assert.Equal(t, "ABC123", keys[0].KeyID) |
| 68 | } |
| 69 | |
| 70 | func Test_listRun(t *testing.T) { |
| 71 | tests := []struct { |
nothing calls this directly
no test coverage detected