Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitccb17fd

Browse files
authored
Merge branch 'main' into simondanielsson/add-list-repos-by-org
2 parents834f0fa +865f9bf commitccb17fd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

‎pkg/github/repositories_test.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,6 @@ func Test_GetCommit(t *testing.T) {
517517
},
518518
},
519519
}
520-
// This one currently isn't defined in the mock package we're using.
521-
varmockEndpointPattern= mock.EndpointPattern{
522-
Pattern:"/repos/{owner}/{repo}/commits/{sha}",
523-
Method:"GET",
524-
}
525520

526521
tests:= []struct {
527522
namestring
@@ -535,7 +530,7 @@ func Test_GetCommit(t *testing.T) {
535530
name:"successful commit fetch",
536531
mockedClient:mock.NewMockedHTTPClient(
537532
mock.WithRequestMatchHandler(
538-
mockEndpointPattern,
533+
mock.GetReposCommitsByOwnerByRepoByRef,
539534
mockResponse(t,http.StatusOK,mockCommit),
540535
),
541536
),
@@ -551,7 +546,7 @@ func Test_GetCommit(t *testing.T) {
551546
name:"commit fetch fails",
552547
mockedClient:mock.NewMockedHTTPClient(
553548
mock.WithRequestMatchHandler(
554-
mockEndpointPattern,
549+
mock.GetReposCommitsByOwnerByRepoByRef,
555550
http.HandlerFunc(func(w http.ResponseWriter,_*http.Request) {
556551
w.WriteHeader(http.StatusNotFound)
557552
_,_=w.Write([]byte(`{"message": "Not Found"}`))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp