MCPcopy Create free account
hub / github.com/google/go-github / TestRepositories_ListByUser

Function TestRepositories_ListByUser

test/integration/repos_test.go:155–171  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

153}
154
155func TestRepositories_ListByUser(t *testing.T) {
156 _, _, err := client.Repositories.ListByUser(t.Context(), "google", nil)
157 if err != nil {
158 t.Fatalf("Repositories.ListByUser('google') returned error: %v", err)
159 }
160
161 opt := github.RepositoryListByUserOptions{Sort: "created"}
162 repos, _, err := client.Repositories.ListByUser(t.Context(), "google", &opt)
163 if err != nil {
164 t.Fatalf("Repositories.List('google') with Sort opt returned error: %v", err)
165 }
166 for i, repo := range repos {
167 if i > 0 && (*repos[i-1].CreatedAt).Time.Before((*repo.CreatedAt).Time) {
168 t.Fatal("Repositories.ListByUser('google') with default descending Sort returned incorrect order")
169 }
170 }
171}
172
173func TestRepositories_DownloadReleaseAsset(t *testing.T) {
174 skipIfMissingAuth(t)

Callers

nothing calls this directly

Calls 1

ListByUserMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…