Skip to content

Commit

Permalink
Improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
gmlewis committed Mar 25, 2022
1 parent 106831b commit 714e01a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions github/repos_contents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,12 +670,12 @@ func TestRepositoriesService_DeleteFile(t *testing.T) {
func TestRepositoriesService_GetArchiveLink(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
mux.HandleFunc("/repos/o/r/tarball", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/repos/o/r/tarball/yo", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
http.Redirect(w, r, "http://github.com/a", http.StatusFound)
})
ctx := context.Background()
url, resp, err := client.Repositories.GetArchiveLink(ctx, "o", "r", Tarball, &RepositoryContentGetOptions{}, true)
url, resp, err := client.Repositories.GetArchiveLink(ctx, "o", "r", Tarball, &RepositoryContentGetOptions{Ref: "yo"}, true)
if err != nil {
t.Errorf("Repositories.GetArchiveLink returned error: %v", err)
}
Expand Down

0 comments on commit 714e01a

Please # to comment.