File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff 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- var mockEndpointPattern = mock.EndpointPattern {
522- Pattern : "/repos/{owner}/{repo}/commits/{sha}" ,
523- Method : "GET" ,
524- }
525520
526521 tests := []struct {
527522 name string
@@ -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"}` ))
You can’t perform that action at this time.
0 commit comments