Skip to content

Commit d7b2d97

Browse files
committed
refactor: replace direct address operators with Ptr function
1 parent 634fe72 commit d7b2d97

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

auth_test.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff 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
},

0 commit comments

Comments
 (0)