File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,26 +69,21 @@ func Test_installationTokenSource_Token(t *testing.T) {
6969 now := time .Now ().UTC ()
7070 expiration := now .Add (10 * time .Minute )
7171
72- githubRead := "read"
73- mockedInstallationToken := "mocked-installation-token"
74- mockedRepo := "mocked-repo-1"
75- var mockedRepoId int64 = 1
76-
7772 mockedHTTPClient := mock .NewMockedHTTPClient (
7873 mock .WithRequestMatch (
7974 mock .PostAppInstallationsAccessTokensByInstallationId ,
8075 github.InstallationToken {
81- Token : & mockedInstallationToken ,
76+ Token : github . Ptr ( "mocked-installation-token" ) ,
8277 ExpiresAt : & github.Timestamp {
8378 Time : expiration ,
8479 },
8580 Permissions : & github.InstallationPermissions {
86- PullRequests : & githubRead ,
81+ PullRequests : github . Ptr ( "read" ) ,
8782 },
8883 Repositories : []* github.Repository {
8984 {
90- Name : & mockedRepo ,
91- ID : & mockedRepoId ,
85+ Name : github . Ptr ( "mocked-repo-1" ) ,
86+ ID : github . Ptr ( int64 ( 1 )) ,
9287 },
9388 },
9489 },
You can’t perform that action at this time.
0 commit comments