github.com/google/go-github/v71@v71.0.0/github/github-stringify_test.go (about) 1 // Copyright 2019 The go-github AUTHORS. All rights reserved. 2 // 3 // Use of this source code is governed by a BSD-style 4 // license that can be found in the LICENSE file. 5 6 // Code generated by gen-stringify-tests; DO NOT EDIT. 7 // Instead, please run "go generate ./..." as described here: 8 // https://github.com/google/go-github/blob/master/CONTRIBUTING.md#submitting-a-patch 9 10 package github 11 12 import ( 13 "testing" 14 ) 15 16 func TestActionsAllowed_String(t *testing.T) { 17 t.Parallel() 18 v := ActionsAllowed{ 19 GithubOwnedAllowed: Ptr(false), 20 VerifiedAllowed: Ptr(false), 21 PatternsAllowed: []string{""}, 22 } 23 want := `github.ActionsAllowed{GithubOwnedAllowed:false, VerifiedAllowed:false, PatternsAllowed:[""]}` 24 if got := v.String(); got != want { 25 t.Errorf("ActionsAllowed.String = %v, want %v", got, want) 26 } 27 } 28 29 func TestActionsPermissions_String(t *testing.T) { 30 t.Parallel() 31 v := ActionsPermissions{ 32 EnabledRepositories: Ptr(""), 33 AllowedActions: Ptr(""), 34 SelectedActionsURL: Ptr(""), 35 } 36 want := `github.ActionsPermissions{EnabledRepositories:"", AllowedActions:"", SelectedActionsURL:""}` 37 if got := v.String(); got != want { 38 t.Errorf("ActionsPermissions.String = %v, want %v", got, want) 39 } 40 } 41 42 func TestActionsPermissionsEnterprise_String(t *testing.T) { 43 t.Parallel() 44 v := ActionsPermissionsEnterprise{ 45 EnabledOrganizations: Ptr(""), 46 AllowedActions: Ptr(""), 47 SelectedActionsURL: Ptr(""), 48 } 49 want := `github.ActionsPermissionsEnterprise{EnabledOrganizations:"", AllowedActions:"", SelectedActionsURL:""}` 50 if got := v.String(); got != want { 51 t.Errorf("ActionsPermissionsEnterprise.String = %v, want %v", got, want) 52 } 53 } 54 55 func TestActionsPermissionsRepository_String(t *testing.T) { 56 t.Parallel() 57 v := ActionsPermissionsRepository{ 58 Enabled: Ptr(false), 59 AllowedActions: Ptr(""), 60 SelectedActionsURL: Ptr(""), 61 } 62 want := `github.ActionsPermissionsRepository{Enabled:false, AllowedActions:"", SelectedActionsURL:""}` 63 if got := v.String(); got != want { 64 t.Errorf("ActionsPermissionsRepository.String = %v, want %v", got, want) 65 } 66 } 67 68 func TestAdminStats_String(t *testing.T) { 69 t.Parallel() 70 v := AdminStats{ 71 Issues: &IssueStats{}, 72 Hooks: &HookStats{}, 73 Milestones: &MilestoneStats{}, 74 Orgs: &OrgStats{}, 75 Comments: &CommentStats{}, 76 Pages: &PageStats{}, 77 Users: &UserStats{}, 78 Gists: &GistStats{}, 79 Pulls: &PullStats{}, 80 Repos: &RepoStats{}, 81 } 82 want := `github.AdminStats{Issues:github.IssueStats{}, Hooks:github.HookStats{}, Milestones:github.MilestoneStats{}, Orgs:github.OrgStats{}, Comments:github.CommentStats{}, Pages:github.PageStats{}, Users:github.UserStats{}, Gists:github.GistStats{}, Pulls:github.PullStats{}, Repos:github.RepoStats{}}` 83 if got := v.String(); got != want { 84 t.Errorf("AdminStats.String = %v, want %v", got, want) 85 } 86 } 87 88 func TestAdvancedSecurity_String(t *testing.T) { 89 t.Parallel() 90 v := AdvancedSecurity{ 91 Status: Ptr(""), 92 } 93 want := `github.AdvancedSecurity{Status:""}` 94 if got := v.String(); got != want { 95 t.Errorf("AdvancedSecurity.String = %v, want %v", got, want) 96 } 97 } 98 99 func TestAuthorization_String(t *testing.T) { 100 t.Parallel() 101 v := Authorization{ 102 ID: Ptr(int64(0)), 103 URL: Ptr(""), 104 Scopes: []Scope{ScopeNone}, 105 Token: Ptr(""), 106 TokenLastEight: Ptr(""), 107 HashedToken: Ptr(""), 108 App: &AuthorizationApp{}, 109 Note: Ptr(""), 110 NoteURL: Ptr(""), 111 UpdatedAt: &Timestamp{}, 112 CreatedAt: &Timestamp{}, 113 Fingerprint: Ptr(""), 114 User: &User{}, 115 } 116 want := `github.Authorization{ID:0, URL:"", Scopes:["(no scope)"], Token:"", TokenLastEight:"", HashedToken:"", App:github.AuthorizationApp{}, Note:"", NoteURL:"", UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Fingerprint:"", User:github.User{}}` 117 if got := v.String(); got != want { 118 t.Errorf("Authorization.String = %v, want %v", got, want) 119 } 120 } 121 122 func TestAuthorizationApp_String(t *testing.T) { 123 t.Parallel() 124 v := AuthorizationApp{ 125 URL: Ptr(""), 126 Name: Ptr(""), 127 ClientID: Ptr(""), 128 } 129 want := `github.AuthorizationApp{URL:"", Name:"", ClientID:""}` 130 if got := v.String(); got != want { 131 t.Errorf("AuthorizationApp.String = %v, want %v", got, want) 132 } 133 } 134 135 func TestAuthorizationRequest_String(t *testing.T) { 136 t.Parallel() 137 v := AuthorizationRequest{ 138 Scopes: []Scope{ScopeNone}, 139 Note: Ptr(""), 140 NoteURL: Ptr(""), 141 ClientID: Ptr(""), 142 ClientSecret: Ptr(""), 143 Fingerprint: Ptr(""), 144 } 145 want := `github.AuthorizationRequest{Scopes:["(no scope)"], Note:"", NoteURL:"", ClientID:"", ClientSecret:"", Fingerprint:""}` 146 if got := v.String(); got != want { 147 t.Errorf("AuthorizationRequest.String = %v, want %v", got, want) 148 } 149 } 150 151 func TestAuthorizationUpdateRequest_String(t *testing.T) { 152 t.Parallel() 153 v := AuthorizationUpdateRequest{ 154 Scopes: []string{""}, 155 AddScopes: []string{""}, 156 RemoveScopes: []string{""}, 157 Note: Ptr(""), 158 NoteURL: Ptr(""), 159 Fingerprint: Ptr(""), 160 } 161 want := `github.AuthorizationUpdateRequest{Scopes:[""], AddScopes:[""], RemoveScopes:[""], Note:"", NoteURL:"", Fingerprint:""}` 162 if got := v.String(); got != want { 163 t.Errorf("AuthorizationUpdateRequest.String = %v, want %v", got, want) 164 } 165 } 166 167 func TestCheckRun_String(t *testing.T) { 168 t.Parallel() 169 v := CheckRun{ 170 ID: Ptr(int64(0)), 171 NodeID: Ptr(""), 172 HeadSHA: Ptr(""), 173 ExternalID: Ptr(""), 174 URL: Ptr(""), 175 HTMLURL: Ptr(""), 176 DetailsURL: Ptr(""), 177 Status: Ptr(""), 178 Conclusion: Ptr(""), 179 StartedAt: &Timestamp{}, 180 CompletedAt: &Timestamp{}, 181 Output: &CheckRunOutput{}, 182 Name: Ptr(""), 183 CheckSuite: &CheckSuite{}, 184 App: &App{}, 185 } 186 want := `github.CheckRun{ID:0, NodeID:"", HeadSHA:"", ExternalID:"", URL:"", HTMLURL:"", DetailsURL:"", Status:"", Conclusion:"", StartedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, CompletedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Output:github.CheckRunOutput{}, Name:"", CheckSuite:github.CheckSuite{}, App:github.App{}}` 187 if got := v.String(); got != want { 188 t.Errorf("CheckRun.String = %v, want %v", got, want) 189 } 190 } 191 192 func TestCheckSuite_String(t *testing.T) { 193 t.Parallel() 194 v := CheckSuite{ 195 ID: Ptr(int64(0)), 196 NodeID: Ptr(""), 197 HeadBranch: Ptr(""), 198 HeadSHA: Ptr(""), 199 URL: Ptr(""), 200 BeforeSHA: Ptr(""), 201 AfterSHA: Ptr(""), 202 Status: Ptr(""), 203 Conclusion: Ptr(""), 204 CreatedAt: &Timestamp{}, 205 UpdatedAt: &Timestamp{}, 206 App: &App{}, 207 Repository: &Repository{}, 208 HeadCommit: &Commit{}, 209 LatestCheckRunsCount: Ptr(int64(0)), 210 Rerequestable: Ptr(false), 211 RunsRerequestable: Ptr(false), 212 } 213 want := `github.CheckSuite{ID:0, NodeID:"", HeadBranch:"", HeadSHA:"", URL:"", BeforeSHA:"", AfterSHA:"", Status:"", Conclusion:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, App:github.App{}, Repository:github.Repository{}, HeadCommit:github.Commit{}, LatestCheckRunsCount:0, Rerequestable:false, RunsRerequestable:false}` 214 if got := v.String(); got != want { 215 t.Errorf("CheckSuite.String = %v, want %v", got, want) 216 } 217 } 218 219 func TestCodeOfConduct_String(t *testing.T) { 220 t.Parallel() 221 v := CodeOfConduct{ 222 Name: Ptr(""), 223 Key: Ptr(""), 224 URL: Ptr(""), 225 Body: Ptr(""), 226 } 227 want := `github.CodeOfConduct{Name:"", Key:"", URL:"", Body:""}` 228 if got := v.String(); got != want { 229 t.Errorf("CodeOfConduct.String = %v, want %v", got, want) 230 } 231 } 232 233 func TestCodeResult_String(t *testing.T) { 234 t.Parallel() 235 v := CodeResult{ 236 Name: Ptr(""), 237 Path: Ptr(""), 238 SHA: Ptr(""), 239 HTMLURL: Ptr(""), 240 Repository: &Repository{}, 241 } 242 want := `github.CodeResult{Name:"", Path:"", SHA:"", HTMLURL:"", Repository:github.Repository{}}` 243 if got := v.String(); got != want { 244 t.Errorf("CodeResult.String = %v, want %v", got, want) 245 } 246 } 247 248 func TestCombinedStatus_String(t *testing.T) { 249 t.Parallel() 250 v := CombinedStatus{ 251 State: Ptr(""), 252 Name: Ptr(""), 253 SHA: Ptr(""), 254 TotalCount: Ptr(0), 255 CommitURL: Ptr(""), 256 RepositoryURL: Ptr(""), 257 } 258 want := `github.CombinedStatus{State:"", Name:"", SHA:"", TotalCount:0, CommitURL:"", RepositoryURL:""}` 259 if got := v.String(); got != want { 260 t.Errorf("CombinedStatus.String = %v, want %v", got, want) 261 } 262 } 263 264 func TestCommentStats_String(t *testing.T) { 265 t.Parallel() 266 v := CommentStats{ 267 TotalCommitComments: Ptr(0), 268 TotalGistComments: Ptr(0), 269 TotalIssueComments: Ptr(0), 270 TotalPullRequestComments: Ptr(0), 271 } 272 want := `github.CommentStats{TotalCommitComments:0, TotalGistComments:0, TotalIssueComments:0, TotalPullRequestComments:0}` 273 if got := v.String(); got != want { 274 t.Errorf("CommentStats.String = %v, want %v", got, want) 275 } 276 } 277 278 func TestCommit_String(t *testing.T) { 279 t.Parallel() 280 v := Commit{ 281 SHA: Ptr(""), 282 Author: &CommitAuthor{}, 283 Committer: &CommitAuthor{}, 284 Message: Ptr(""), 285 Tree: &Tree{}, 286 HTMLURL: Ptr(""), 287 URL: Ptr(""), 288 Verification: &SignatureVerification{}, 289 NodeID: Ptr(""), 290 CommentCount: Ptr(0), 291 } 292 want := `github.Commit{SHA:"", Author:github.CommitAuthor{}, Committer:github.CommitAuthor{}, Message:"", Tree:github.Tree{}, HTMLURL:"", URL:"", Verification:github.SignatureVerification{}, NodeID:"", CommentCount:0}` 293 if got := v.String(); got != want { 294 t.Errorf("Commit.String = %v, want %v", got, want) 295 } 296 } 297 298 func TestCommitAuthor_String(t *testing.T) { 299 t.Parallel() 300 v := CommitAuthor{ 301 Date: &Timestamp{}, 302 Name: Ptr(""), 303 Email: Ptr(""), 304 Login: Ptr(""), 305 } 306 want := `github.CommitAuthor{Date:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Name:"", Email:"", Login:""}` 307 if got := v.String(); got != want { 308 t.Errorf("CommitAuthor.String = %v, want %v", got, want) 309 } 310 } 311 312 func TestCommitFile_String(t *testing.T) { 313 t.Parallel() 314 v := CommitFile{ 315 SHA: Ptr(""), 316 Filename: Ptr(""), 317 Additions: Ptr(0), 318 Deletions: Ptr(0), 319 Changes: Ptr(0), 320 Status: Ptr(""), 321 Patch: Ptr(""), 322 BlobURL: Ptr(""), 323 RawURL: Ptr(""), 324 ContentsURL: Ptr(""), 325 PreviousFilename: Ptr(""), 326 } 327 want := `github.CommitFile{SHA:"", Filename:"", Additions:0, Deletions:0, Changes:0, Status:"", Patch:"", BlobURL:"", RawURL:"", ContentsURL:"", PreviousFilename:""}` 328 if got := v.String(); got != want { 329 t.Errorf("CommitFile.String = %v, want %v", got, want) 330 } 331 } 332 333 func TestCommitStats_String(t *testing.T) { 334 t.Parallel() 335 v := CommitStats{ 336 Additions: Ptr(0), 337 Deletions: Ptr(0), 338 Total: Ptr(0), 339 } 340 want := `github.CommitStats{Additions:0, Deletions:0, Total:0}` 341 if got := v.String(); got != want { 342 t.Errorf("CommitStats.String = %v, want %v", got, want) 343 } 344 } 345 346 func TestCommitsComparison_String(t *testing.T) { 347 t.Parallel() 348 v := CommitsComparison{ 349 BaseCommit: &RepositoryCommit{}, 350 MergeBaseCommit: &RepositoryCommit{}, 351 Status: Ptr(""), 352 AheadBy: Ptr(0), 353 BehindBy: Ptr(0), 354 TotalCommits: Ptr(0), 355 HTMLURL: Ptr(""), 356 PermalinkURL: Ptr(""), 357 DiffURL: Ptr(""), 358 PatchURL: Ptr(""), 359 URL: Ptr(""), 360 } 361 want := `github.CommitsComparison{BaseCommit:github.RepositoryCommit{}, MergeBaseCommit:github.RepositoryCommit{}, Status:"", AheadBy:0, BehindBy:0, TotalCommits:0, HTMLURL:"", PermalinkURL:"", DiffURL:"", PatchURL:"", URL:""}` 362 if got := v.String(); got != want { 363 t.Errorf("CommitsComparison.String = %v, want %v", got, want) 364 } 365 } 366 367 func TestContributorStats_String(t *testing.T) { 368 t.Parallel() 369 v := ContributorStats{ 370 Author: &Contributor{}, 371 Total: Ptr(0), 372 } 373 want := `github.ContributorStats{Author:github.Contributor{}, Total:0}` 374 if got := v.String(); got != want { 375 t.Errorf("ContributorStats.String = %v, want %v", got, want) 376 } 377 } 378 379 func TestDependabotSecurityUpdates_String(t *testing.T) { 380 t.Parallel() 381 v := DependabotSecurityUpdates{ 382 Status: Ptr(""), 383 } 384 want := `github.DependabotSecurityUpdates{Status:""}` 385 if got := v.String(); got != want { 386 t.Errorf("DependabotSecurityUpdates.String = %v, want %v", got, want) 387 } 388 } 389 390 func TestDiscussionComment_String(t *testing.T) { 391 t.Parallel() 392 v := DiscussionComment{ 393 Author: &User{}, 394 Body: Ptr(""), 395 BodyHTML: Ptr(""), 396 BodyVersion: Ptr(""), 397 CreatedAt: &Timestamp{}, 398 LastEditedAt: &Timestamp{}, 399 DiscussionURL: Ptr(""), 400 HTMLURL: Ptr(""), 401 NodeID: Ptr(""), 402 Number: Ptr(0), 403 UpdatedAt: &Timestamp{}, 404 URL: Ptr(""), 405 Reactions: &Reactions{}, 406 } 407 want := `github.DiscussionComment{Author:github.User{}, Body:"", BodyHTML:"", BodyVersion:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, LastEditedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, DiscussionURL:"", HTMLURL:"", NodeID:"", Number:0, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, URL:"", Reactions:github.Reactions{}}` 408 if got := v.String(); got != want { 409 t.Errorf("DiscussionComment.String = %v, want %v", got, want) 410 } 411 } 412 413 func TestDraftReviewComment_String(t *testing.T) { 414 t.Parallel() 415 v := DraftReviewComment{ 416 Path: Ptr(""), 417 Position: Ptr(0), 418 Body: Ptr(""), 419 StartSide: Ptr(""), 420 Side: Ptr(""), 421 StartLine: Ptr(0), 422 Line: Ptr(0), 423 } 424 want := `github.DraftReviewComment{Path:"", Position:0, Body:"", StartSide:"", Side:"", StartLine:0, Line:0}` 425 if got := v.String(); got != want { 426 t.Errorf("DraftReviewComment.String = %v, want %v", got, want) 427 } 428 } 429 430 func TestEnterprise_String(t *testing.T) { 431 t.Parallel() 432 v := Enterprise{ 433 ID: Ptr(0), 434 Slug: Ptr(""), 435 Name: Ptr(""), 436 NodeID: Ptr(""), 437 AvatarURL: Ptr(""), 438 Description: Ptr(""), 439 WebsiteURL: Ptr(""), 440 HTMLURL: Ptr(""), 441 CreatedAt: &Timestamp{}, 442 UpdatedAt: &Timestamp{}, 443 } 444 want := `github.Enterprise{ID:0, Slug:"", Name:"", NodeID:"", AvatarURL:"", Description:"", WebsiteURL:"", HTMLURL:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 445 if got := v.String(); got != want { 446 t.Errorf("Enterprise.String = %v, want %v", got, want) 447 } 448 } 449 450 func TestEvent_String(t *testing.T) { 451 t.Parallel() 452 v := Event{ 453 Type: Ptr(""), 454 Public: Ptr(false), 455 Repo: &Repository{}, 456 Actor: &User{}, 457 Org: &Organization{}, 458 CreatedAt: &Timestamp{}, 459 ID: Ptr(""), 460 } 461 want := `github.Event{Type:"", Public:false, Repo:github.Repository{}, Actor:github.User{}, Org:github.Organization{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, ID:""}` 462 if got := v.String(); got != want { 463 t.Errorf("Event.String = %v, want %v", got, want) 464 } 465 } 466 467 func TestGPGKey_String(t *testing.T) { 468 t.Parallel() 469 v := GPGKey{ 470 ID: Ptr(int64(0)), 471 PrimaryKeyID: Ptr(int64(0)), 472 KeyID: Ptr(""), 473 RawKey: Ptr(""), 474 PublicKey: Ptr(""), 475 CanSign: Ptr(false), 476 CanEncryptComms: Ptr(false), 477 CanEncryptStorage: Ptr(false), 478 CanCertify: Ptr(false), 479 CreatedAt: &Timestamp{}, 480 ExpiresAt: &Timestamp{}, 481 } 482 want := `github.GPGKey{ID:0, PrimaryKeyID:0, KeyID:"", RawKey:"", PublicKey:"", CanSign:false, CanEncryptComms:false, CanEncryptStorage:false, CanCertify:false, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, ExpiresAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 483 if got := v.String(); got != want { 484 t.Errorf("GPGKey.String = %v, want %v", got, want) 485 } 486 } 487 488 func TestGist_String(t *testing.T) { 489 t.Parallel() 490 v := Gist{ 491 ID: Ptr(""), 492 Description: Ptr(""), 493 Public: Ptr(false), 494 Owner: &User{}, 495 Comments: Ptr(0), 496 HTMLURL: Ptr(""), 497 GitPullURL: Ptr(""), 498 GitPushURL: Ptr(""), 499 CreatedAt: &Timestamp{}, 500 UpdatedAt: &Timestamp{}, 501 NodeID: Ptr(""), 502 } 503 want := `github.Gist{ID:"", Description:"", Public:false, Owner:github.User{}, Comments:0, HTMLURL:"", GitPullURL:"", GitPushURL:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, NodeID:""}` 504 if got := v.String(); got != want { 505 t.Errorf("Gist.String = %v, want %v", got, want) 506 } 507 } 508 509 func TestGistComment_String(t *testing.T) { 510 t.Parallel() 511 v := GistComment{ 512 ID: Ptr(int64(0)), 513 URL: Ptr(""), 514 Body: Ptr(""), 515 User: &User{}, 516 CreatedAt: &Timestamp{}, 517 } 518 want := `github.GistComment{ID:0, URL:"", Body:"", User:github.User{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 519 if got := v.String(); got != want { 520 t.Errorf("GistComment.String = %v, want %v", got, want) 521 } 522 } 523 524 func TestGistCommit_String(t *testing.T) { 525 t.Parallel() 526 v := GistCommit{ 527 URL: Ptr(""), 528 Version: Ptr(""), 529 User: &User{}, 530 ChangeStatus: &CommitStats{}, 531 CommittedAt: &Timestamp{}, 532 NodeID: Ptr(""), 533 } 534 want := `github.GistCommit{URL:"", Version:"", User:github.User{}, ChangeStatus:github.CommitStats{}, CommittedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, NodeID:""}` 535 if got := v.String(); got != want { 536 t.Errorf("GistCommit.String = %v, want %v", got, want) 537 } 538 } 539 540 func TestGistFile_String(t *testing.T) { 541 t.Parallel() 542 v := GistFile{ 543 Size: Ptr(0), 544 Filename: Ptr(""), 545 Language: Ptr(""), 546 Type: Ptr(""), 547 RawURL: Ptr(""), 548 Content: Ptr(""), 549 } 550 want := `github.GistFile{Size:0, Filename:"", Language:"", Type:"", RawURL:"", Content:""}` 551 if got := v.String(); got != want { 552 t.Errorf("GistFile.String = %v, want %v", got, want) 553 } 554 } 555 556 func TestGistFork_String(t *testing.T) { 557 t.Parallel() 558 v := GistFork{ 559 URL: Ptr(""), 560 User: &User{}, 561 ID: Ptr(""), 562 CreatedAt: &Timestamp{}, 563 UpdatedAt: &Timestamp{}, 564 NodeID: Ptr(""), 565 } 566 want := `github.GistFork{URL:"", User:github.User{}, ID:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, NodeID:""}` 567 if got := v.String(); got != want { 568 t.Errorf("GistFork.String = %v, want %v", got, want) 569 } 570 } 571 572 func TestGistStats_String(t *testing.T) { 573 t.Parallel() 574 v := GistStats{ 575 TotalGists: Ptr(0), 576 PrivateGists: Ptr(0), 577 PublicGists: Ptr(0), 578 } 579 want := `github.GistStats{TotalGists:0, PrivateGists:0, PublicGists:0}` 580 if got := v.String(); got != want { 581 t.Errorf("GistStats.String = %v, want %v", got, want) 582 } 583 } 584 585 func TestGitObject_String(t *testing.T) { 586 t.Parallel() 587 v := GitObject{ 588 Type: Ptr(""), 589 SHA: Ptr(""), 590 URL: Ptr(""), 591 } 592 want := `github.GitObject{Type:"", SHA:"", URL:""}` 593 if got := v.String(); got != want { 594 t.Errorf("GitObject.String = %v, want %v", got, want) 595 } 596 } 597 598 func TestGitignore_String(t *testing.T) { 599 t.Parallel() 600 v := Gitignore{ 601 Name: Ptr(""), 602 Source: Ptr(""), 603 } 604 want := `github.Gitignore{Name:"", Source:""}` 605 if got := v.String(); got != want { 606 t.Errorf("Gitignore.String = %v, want %v", got, want) 607 } 608 } 609 610 func TestGrant_String(t *testing.T) { 611 t.Parallel() 612 v := Grant{ 613 ID: Ptr(int64(0)), 614 URL: Ptr(""), 615 App: &AuthorizationApp{}, 616 CreatedAt: &Timestamp{}, 617 UpdatedAt: &Timestamp{}, 618 Scopes: []string{""}, 619 } 620 want := `github.Grant{ID:0, URL:"", App:github.AuthorizationApp{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Scopes:[""]}` 621 if got := v.String(); got != want { 622 t.Errorf("Grant.String = %v, want %v", got, want) 623 } 624 } 625 626 func TestHeadCommit_String(t *testing.T) { 627 t.Parallel() 628 v := HeadCommit{ 629 Message: Ptr(""), 630 Author: &CommitAuthor{}, 631 URL: Ptr(""), 632 Distinct: Ptr(false), 633 SHA: Ptr(""), 634 ID: Ptr(""), 635 TreeID: Ptr(""), 636 Timestamp: &Timestamp{}, 637 Committer: &CommitAuthor{}, 638 Added: []string{""}, 639 Removed: []string{""}, 640 Modified: []string{""}, 641 } 642 want := `github.HeadCommit{Message:"", Author:github.CommitAuthor{}, URL:"", Distinct:false, SHA:"", ID:"", TreeID:"", Timestamp:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Committer:github.CommitAuthor{}, Added:[""], Removed:[""], Modified:[""]}` 643 if got := v.String(); got != want { 644 t.Errorf("HeadCommit.String = %v, want %v", got, want) 645 } 646 } 647 648 func TestHook_String(t *testing.T) { 649 t.Parallel() 650 v := Hook{ 651 CreatedAt: &Timestamp{}, 652 UpdatedAt: &Timestamp{}, 653 URL: Ptr(""), 654 ID: Ptr(int64(0)), 655 Type: Ptr(""), 656 Name: Ptr(""), 657 TestURL: Ptr(""), 658 PingURL: Ptr(""), 659 Config: &HookConfig{}, 660 Events: []string{""}, 661 Active: Ptr(false), 662 } 663 want := `github.Hook{CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, URL:"", ID:0, Type:"", Name:"", TestURL:"", PingURL:"", Config:github.HookConfig{}, Events:[""], Active:false}` 664 if got := v.String(); got != want { 665 t.Errorf("Hook.String = %v, want %v", got, want) 666 } 667 } 668 669 func TestHookDelivery_String(t *testing.T) { 670 t.Parallel() 671 v := HookDelivery{ 672 ID: Ptr(int64(0)), 673 GUID: Ptr(""), 674 DeliveredAt: &Timestamp{}, 675 Redelivery: Ptr(false), 676 Duration: Ptr(0.0), 677 Status: Ptr(""), 678 StatusCode: Ptr(0), 679 Event: Ptr(""), 680 Action: Ptr(""), 681 InstallationID: Ptr(int64(0)), 682 RepositoryID: Ptr(int64(0)), 683 Request: &HookRequest{}, 684 Response: &HookResponse{}, 685 } 686 want := `github.HookDelivery{ID:0, GUID:"", DeliveredAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Redelivery:false, Duration:0, Status:"", StatusCode:0, Event:"", Action:"", InstallationID:0, RepositoryID:0, Request:github.HookRequest{}, Response:github.HookResponse{}}` 687 if got := v.String(); got != want { 688 t.Errorf("HookDelivery.String = %v, want %v", got, want) 689 } 690 } 691 692 func TestHookStats_String(t *testing.T) { 693 t.Parallel() 694 v := HookStats{ 695 TotalHooks: Ptr(0), 696 ActiveHooks: Ptr(0), 697 InactiveHooks: Ptr(0), 698 } 699 want := `github.HookStats{TotalHooks:0, ActiveHooks:0, InactiveHooks:0}` 700 if got := v.String(); got != want { 701 t.Errorf("HookStats.String = %v, want %v", got, want) 702 } 703 } 704 705 func TestImport_String(t *testing.T) { 706 t.Parallel() 707 v := Import{ 708 VCSURL: Ptr(""), 709 VCS: Ptr(""), 710 VCSUsername: Ptr(""), 711 VCSPassword: Ptr(""), 712 TFVCProject: Ptr(""), 713 UseLFS: Ptr(""), 714 HasLargeFiles: Ptr(false), 715 LargeFilesSize: Ptr(0), 716 LargeFilesCount: Ptr(0), 717 Status: Ptr(""), 718 CommitCount: Ptr(0), 719 StatusText: Ptr(""), 720 AuthorsCount: Ptr(0), 721 Percent: Ptr(0), 722 PushPercent: Ptr(0), 723 URL: Ptr(""), 724 HTMLURL: Ptr(""), 725 AuthorsURL: Ptr(""), 726 RepositoryURL: Ptr(""), 727 Message: Ptr(""), 728 FailedStep: Ptr(""), 729 HumanName: Ptr(""), 730 } 731 want := `github.Import{VCSURL:"", VCS:"", VCSUsername:"", VCSPassword:"", TFVCProject:"", UseLFS:"", HasLargeFiles:false, LargeFilesSize:0, LargeFilesCount:0, Status:"", CommitCount:0, StatusText:"", AuthorsCount:0, Percent:0, PushPercent:0, URL:"", HTMLURL:"", AuthorsURL:"", RepositoryURL:"", Message:"", FailedStep:"", HumanName:""}` 732 if got := v.String(); got != want { 733 t.Errorf("Import.String = %v, want %v", got, want) 734 } 735 } 736 737 func TestInstallation_String(t *testing.T) { 738 t.Parallel() 739 v := Installation{ 740 ID: Ptr(int64(0)), 741 NodeID: Ptr(""), 742 AppID: Ptr(int64(0)), 743 AppSlug: Ptr(""), 744 TargetID: Ptr(int64(0)), 745 Account: &User{}, 746 AccessTokensURL: Ptr(""), 747 RepositoriesURL: Ptr(""), 748 HTMLURL: Ptr(""), 749 TargetType: Ptr(""), 750 SingleFileName: Ptr(""), 751 RepositorySelection: Ptr(""), 752 Events: []string{""}, 753 SingleFilePaths: []string{""}, 754 Permissions: &InstallationPermissions{}, 755 CreatedAt: &Timestamp{}, 756 UpdatedAt: &Timestamp{}, 757 HasMultipleSingleFiles: Ptr(false), 758 SuspendedBy: &User{}, 759 SuspendedAt: &Timestamp{}, 760 } 761 want := `github.Installation{ID:0, NodeID:"", AppID:0, AppSlug:"", TargetID:0, Account:github.User{}, AccessTokensURL:"", RepositoriesURL:"", HTMLURL:"", TargetType:"", SingleFileName:"", RepositorySelection:"", Events:[""], SingleFilePaths:[""], Permissions:github.InstallationPermissions{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, HasMultipleSingleFiles:false, SuspendedBy:github.User{}, SuspendedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 762 if got := v.String(); got != want { 763 t.Errorf("Installation.String = %v, want %v", got, want) 764 } 765 } 766 767 func TestInvitation_String(t *testing.T) { 768 t.Parallel() 769 v := Invitation{ 770 ID: Ptr(int64(0)), 771 NodeID: Ptr(""), 772 Login: Ptr(""), 773 Email: Ptr(""), 774 Role: Ptr(""), 775 CreatedAt: &Timestamp{}, 776 Inviter: &User{}, 777 TeamCount: Ptr(0), 778 InvitationTeamURL: Ptr(""), 779 FailedAt: &Timestamp{}, 780 FailedReason: Ptr(""), 781 } 782 want := `github.Invitation{ID:0, NodeID:"", Login:"", Email:"", Role:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Inviter:github.User{}, TeamCount:0, InvitationTeamURL:"", FailedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, FailedReason:""}` 783 if got := v.String(); got != want { 784 t.Errorf("Invitation.String = %v, want %v", got, want) 785 } 786 } 787 788 func TestIssue_String(t *testing.T) { 789 t.Parallel() 790 v := Issue{ 791 ID: Ptr(int64(0)), 792 Number: Ptr(0), 793 State: Ptr(""), 794 StateReason: Ptr(""), 795 Locked: Ptr(false), 796 Title: Ptr(""), 797 Body: Ptr(""), 798 AuthorAssociation: Ptr(""), 799 User: &User{}, 800 Assignee: &User{}, 801 Comments: Ptr(0), 802 ClosedAt: &Timestamp{}, 803 CreatedAt: &Timestamp{}, 804 UpdatedAt: &Timestamp{}, 805 ClosedBy: &User{}, 806 URL: Ptr(""), 807 HTMLURL: Ptr(""), 808 CommentsURL: Ptr(""), 809 EventsURL: Ptr(""), 810 LabelsURL: Ptr(""), 811 RepositoryURL: Ptr(""), 812 Milestone: &Milestone{}, 813 PullRequestLinks: &PullRequestLinks{}, 814 Repository: &Repository{}, 815 Reactions: &Reactions{}, 816 NodeID: Ptr(""), 817 Draft: Ptr(false), 818 Type: &IssueType{}, 819 ActiveLockReason: Ptr(""), 820 } 821 want := `github.Issue{ID:0, Number:0, State:"", StateReason:"", Locked:false, Title:"", Body:"", AuthorAssociation:"", User:github.User{}, Assignee:github.User{}, Comments:0, ClosedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, ClosedBy:github.User{}, URL:"", HTMLURL:"", CommentsURL:"", EventsURL:"", LabelsURL:"", RepositoryURL:"", Milestone:github.Milestone{}, PullRequestLinks:github.PullRequestLinks{}, Repository:github.Repository{}, Reactions:github.Reactions{}, NodeID:"", Draft:false, Type:github.IssueType{}, ActiveLockReason:""}` 822 if got := v.String(); got != want { 823 t.Errorf("Issue.String = %v, want %v", got, want) 824 } 825 } 826 827 func TestIssueComment_String(t *testing.T) { 828 t.Parallel() 829 v := IssueComment{ 830 ID: Ptr(int64(0)), 831 NodeID: Ptr(""), 832 Body: Ptr(""), 833 User: &User{}, 834 Reactions: &Reactions{}, 835 CreatedAt: &Timestamp{}, 836 UpdatedAt: &Timestamp{}, 837 AuthorAssociation: Ptr(""), 838 URL: Ptr(""), 839 HTMLURL: Ptr(""), 840 IssueURL: Ptr(""), 841 } 842 want := `github.IssueComment{ID:0, NodeID:"", Body:"", User:github.User{}, Reactions:github.Reactions{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, AuthorAssociation:"", URL:"", HTMLURL:"", IssueURL:""}` 843 if got := v.String(); got != want { 844 t.Errorf("IssueComment.String = %v, want %v", got, want) 845 } 846 } 847 848 func TestIssueStats_String(t *testing.T) { 849 t.Parallel() 850 v := IssueStats{ 851 TotalIssues: Ptr(0), 852 OpenIssues: Ptr(0), 853 ClosedIssues: Ptr(0), 854 } 855 want := `github.IssueStats{TotalIssues:0, OpenIssues:0, ClosedIssues:0}` 856 if got := v.String(); got != want { 857 t.Errorf("IssueStats.String = %v, want %v", got, want) 858 } 859 } 860 861 func TestKey_String(t *testing.T) { 862 t.Parallel() 863 v := Key{ 864 ID: Ptr(int64(0)), 865 Key: Ptr(""), 866 URL: Ptr(""), 867 Title: Ptr(""), 868 ReadOnly: Ptr(false), 869 Verified: Ptr(false), 870 CreatedAt: &Timestamp{}, 871 AddedBy: Ptr(""), 872 LastUsed: &Timestamp{}, 873 } 874 want := `github.Key{ID:0, Key:"", URL:"", Title:"", ReadOnly:false, Verified:false, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, AddedBy:"", LastUsed:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 875 if got := v.String(); got != want { 876 t.Errorf("Key.String = %v, want %v", got, want) 877 } 878 } 879 880 func TestLabel_String(t *testing.T) { 881 t.Parallel() 882 v := Label{ 883 ID: Ptr(int64(0)), 884 URL: Ptr(""), 885 Name: Ptr(""), 886 Color: Ptr(""), 887 Description: Ptr(""), 888 Default: Ptr(false), 889 NodeID: Ptr(""), 890 } 891 want := `github.Label{ID:0, URL:"", Name:"", Color:"", Description:"", Default:false, NodeID:""}` 892 if got := v.String(); got != want { 893 t.Errorf("Label.String = %v, want %v", got, want) 894 } 895 } 896 897 func TestLabelResult_String(t *testing.T) { 898 t.Parallel() 899 v := LabelResult{ 900 ID: Ptr(int64(0)), 901 URL: Ptr(""), 902 Name: Ptr(""), 903 Color: Ptr(""), 904 Default: Ptr(false), 905 Description: Ptr(""), 906 Score: Ptr(0.0), 907 } 908 want := `github.LabelResult{ID:0, URL:"", Name:"", Color:"", Default:false, Description:"", Score:0}` 909 if got := v.String(); got != want { 910 t.Errorf("LabelResult.String = %v, want %v", got, want) 911 } 912 } 913 914 func TestLargeFile_String(t *testing.T) { 915 t.Parallel() 916 v := LargeFile{ 917 RefName: Ptr(""), 918 Path: Ptr(""), 919 OID: Ptr(""), 920 Size: Ptr(0), 921 } 922 want := `github.LargeFile{RefName:"", Path:"", OID:"", Size:0}` 923 if got := v.String(); got != want { 924 t.Errorf("LargeFile.String = %v, want %v", got, want) 925 } 926 } 927 928 func TestLicense_String(t *testing.T) { 929 t.Parallel() 930 v := License{ 931 Key: Ptr(""), 932 Name: Ptr(""), 933 URL: Ptr(""), 934 SPDXID: Ptr(""), 935 HTMLURL: Ptr(""), 936 Featured: Ptr(false), 937 Description: Ptr(""), 938 Implementation: Ptr(""), 939 Body: Ptr(""), 940 } 941 want := `github.License{Key:"", Name:"", URL:"", SPDXID:"", HTMLURL:"", Featured:false, Description:"", Implementation:"", Body:""}` 942 if got := v.String(); got != want { 943 t.Errorf("License.String = %v, want %v", got, want) 944 } 945 } 946 947 func TestMembership_String(t *testing.T) { 948 t.Parallel() 949 v := Membership{ 950 URL: Ptr(""), 951 State: Ptr(""), 952 Role: Ptr(""), 953 OrganizationURL: Ptr(""), 954 Organization: &Organization{}, 955 User: &User{}, 956 } 957 want := `github.Membership{URL:"", State:"", Role:"", OrganizationURL:"", Organization:github.Organization{}, User:github.User{}}` 958 if got := v.String(); got != want { 959 t.Errorf("Membership.String = %v, want %v", got, want) 960 } 961 } 962 963 func TestMigration_String(t *testing.T) { 964 t.Parallel() 965 v := Migration{ 966 ID: Ptr(int64(0)), 967 GUID: Ptr(""), 968 State: Ptr(""), 969 LockRepositories: Ptr(false), 970 ExcludeAttachments: Ptr(false), 971 URL: Ptr(""), 972 CreatedAt: Ptr(""), 973 UpdatedAt: Ptr(""), 974 } 975 want := `github.Migration{ID:0, GUID:"", State:"", LockRepositories:false, ExcludeAttachments:false, URL:"", CreatedAt:"", UpdatedAt:""}` 976 if got := v.String(); got != want { 977 t.Errorf("Migration.String = %v, want %v", got, want) 978 } 979 } 980 981 func TestMilestone_String(t *testing.T) { 982 t.Parallel() 983 v := Milestone{ 984 URL: Ptr(""), 985 HTMLURL: Ptr(""), 986 LabelsURL: Ptr(""), 987 ID: Ptr(int64(0)), 988 Number: Ptr(0), 989 State: Ptr(""), 990 Title: Ptr(""), 991 Description: Ptr(""), 992 Creator: &User{}, 993 OpenIssues: Ptr(0), 994 ClosedIssues: Ptr(0), 995 CreatedAt: &Timestamp{}, 996 UpdatedAt: &Timestamp{}, 997 ClosedAt: &Timestamp{}, 998 DueOn: &Timestamp{}, 999 NodeID: Ptr(""), 1000 } 1001 want := `github.Milestone{URL:"", HTMLURL:"", LabelsURL:"", ID:0, Number:0, State:"", Title:"", Description:"", Creator:github.User{}, OpenIssues:0, ClosedIssues:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, ClosedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, DueOn:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, NodeID:""}` 1002 if got := v.String(); got != want { 1003 t.Errorf("Milestone.String = %v, want %v", got, want) 1004 } 1005 } 1006 1007 func TestMilestoneStats_String(t *testing.T) { 1008 t.Parallel() 1009 v := MilestoneStats{ 1010 TotalMilestones: Ptr(0), 1011 OpenMilestones: Ptr(0), 1012 ClosedMilestones: Ptr(0), 1013 } 1014 want := `github.MilestoneStats{TotalMilestones:0, OpenMilestones:0, ClosedMilestones:0}` 1015 if got := v.String(); got != want { 1016 t.Errorf("MilestoneStats.String = %v, want %v", got, want) 1017 } 1018 } 1019 1020 func TestNewTeam_String(t *testing.T) { 1021 t.Parallel() 1022 v := NewTeam{ 1023 Name: "", 1024 Description: Ptr(""), 1025 Maintainers: []string{""}, 1026 RepoNames: []string{""}, 1027 ParentTeamID: Ptr(int64(0)), 1028 NotificationSetting: Ptr(""), 1029 Permission: Ptr(""), 1030 Privacy: Ptr(""), 1031 LDAPDN: Ptr(""), 1032 } 1033 want := `github.NewTeam{Name:"", Description:"", Maintainers:[""], RepoNames:[""], ParentTeamID:0, NotificationSetting:"", Permission:"", Privacy:"", LDAPDN:""}` 1034 if got := v.String(); got != want { 1035 t.Errorf("NewTeam.String = %v, want %v", got, want) 1036 } 1037 } 1038 1039 func TestOAuthAPP_String(t *testing.T) { 1040 t.Parallel() 1041 v := OAuthAPP{ 1042 URL: Ptr(""), 1043 Name: Ptr(""), 1044 ClientID: Ptr(""), 1045 } 1046 want := `github.OAuthAPP{URL:"", Name:"", ClientID:""}` 1047 if got := v.String(); got != want { 1048 t.Errorf("OAuthAPP.String = %v, want %v", got, want) 1049 } 1050 } 1051 1052 func TestOrgStats_String(t *testing.T) { 1053 t.Parallel() 1054 v := OrgStats{ 1055 TotalOrgs: Ptr(0), 1056 DisabledOrgs: Ptr(0), 1057 TotalTeams: Ptr(0), 1058 TotalTeamMembers: Ptr(0), 1059 } 1060 want := `github.OrgStats{TotalOrgs:0, DisabledOrgs:0, TotalTeams:0, TotalTeamMembers:0}` 1061 if got := v.String(); got != want { 1062 t.Errorf("OrgStats.String = %v, want %v", got, want) 1063 } 1064 } 1065 1066 func TestOrganization_String(t *testing.T) { 1067 t.Parallel() 1068 v := Organization{ 1069 Login: Ptr(""), 1070 ID: Ptr(int64(0)), 1071 NodeID: Ptr(""), 1072 AvatarURL: Ptr(""), 1073 HTMLURL: Ptr(""), 1074 Name: Ptr(""), 1075 Company: Ptr(""), 1076 Blog: Ptr(""), 1077 Location: Ptr(""), 1078 Email: Ptr(""), 1079 TwitterUsername: Ptr(""), 1080 Description: Ptr(""), 1081 PublicRepos: Ptr(0), 1082 PublicGists: Ptr(0), 1083 Followers: Ptr(0), 1084 Following: Ptr(0), 1085 CreatedAt: &Timestamp{}, 1086 UpdatedAt: &Timestamp{}, 1087 TotalPrivateRepos: Ptr(int64(0)), 1088 OwnedPrivateRepos: Ptr(int64(0)), 1089 PrivateGists: Ptr(0), 1090 DiskUsage: Ptr(0), 1091 Collaborators: Ptr(0), 1092 BillingEmail: Ptr(""), 1093 Type: Ptr(""), 1094 Plan: &Plan{}, 1095 TwoFactorRequirementEnabled: Ptr(false), 1096 IsVerified: Ptr(false), 1097 HasOrganizationProjects: Ptr(false), 1098 HasRepositoryProjects: Ptr(false), 1099 DefaultRepoPermission: Ptr(""), 1100 DefaultRepoSettings: Ptr(""), 1101 MembersCanCreateRepos: Ptr(false), 1102 MembersCanCreatePublicRepos: Ptr(false), 1103 MembersCanCreatePrivateRepos: Ptr(false), 1104 MembersCanCreateInternalRepos: Ptr(false), 1105 MembersCanForkPrivateRepos: Ptr(false), 1106 MembersAllowedRepositoryCreationType: Ptr(""), 1107 MembersCanCreatePages: Ptr(false), 1108 MembersCanCreatePublicPages: Ptr(false), 1109 MembersCanCreatePrivatePages: Ptr(false), 1110 WebCommitSignoffRequired: Ptr(false), 1111 AdvancedSecurityEnabledForNewRepos: Ptr(false), 1112 DependabotAlertsEnabledForNewRepos: Ptr(false), 1113 DependabotSecurityUpdatesEnabledForNewRepos: Ptr(false), 1114 DependencyGraphEnabledForNewRepos: Ptr(false), 1115 SecretScanningEnabledForNewRepos: Ptr(false), 1116 SecretScanningPushProtectionEnabledForNewRepos: Ptr(false), 1117 SecretScanningValidityChecksEnabled: Ptr(false), 1118 URL: Ptr(""), 1119 EventsURL: Ptr(""), 1120 HooksURL: Ptr(""), 1121 IssuesURL: Ptr(""), 1122 MembersURL: Ptr(""), 1123 PublicMembersURL: Ptr(""), 1124 ReposURL: Ptr(""), 1125 } 1126 want := `github.Organization{Login:"", ID:0, NodeID:"", AvatarURL:"", HTMLURL:"", Name:"", Company:"", Blog:"", Location:"", Email:"", TwitterUsername:"", Description:"", PublicRepos:0, PublicGists:0, Followers:0, Following:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, TotalPrivateRepos:0, OwnedPrivateRepos:0, PrivateGists:0, DiskUsage:0, Collaborators:0, BillingEmail:"", Type:"", Plan:github.Plan{}, TwoFactorRequirementEnabled:false, IsVerified:false, HasOrganizationProjects:false, HasRepositoryProjects:false, DefaultRepoPermission:"", DefaultRepoSettings:"", MembersCanCreateRepos:false, MembersCanCreatePublicRepos:false, MembersCanCreatePrivateRepos:false, MembersCanCreateInternalRepos:false, MembersCanForkPrivateRepos:false, MembersAllowedRepositoryCreationType:"", MembersCanCreatePages:false, MembersCanCreatePublicPages:false, MembersCanCreatePrivatePages:false, WebCommitSignoffRequired:false, AdvancedSecurityEnabledForNewRepos:false, DependabotAlertsEnabledForNewRepos:false, DependabotSecurityUpdatesEnabledForNewRepos:false, DependencyGraphEnabledForNewRepos:false, SecretScanningEnabledForNewRepos:false, SecretScanningPushProtectionEnabledForNewRepos:false, SecretScanningValidityChecksEnabled:false, URL:"", EventsURL:"", HooksURL:"", IssuesURL:"", MembersURL:"", PublicMembersURL:"", ReposURL:""}` 1127 if got := v.String(); got != want { 1128 t.Errorf("Organization.String = %v, want %v", got, want) 1129 } 1130 } 1131 1132 func TestPackage_String(t *testing.T) { 1133 t.Parallel() 1134 v := Package{ 1135 ID: Ptr(int64(0)), 1136 Name: Ptr(""), 1137 PackageType: Ptr(""), 1138 HTMLURL: Ptr(""), 1139 Visibility: Ptr(""), 1140 Owner: &User{}, 1141 Repository: &Repository{}, 1142 CreatedAt: &Timestamp{}, 1143 UpdatedAt: &Timestamp{}, 1144 Namespace: Ptr(""), 1145 Description: Ptr(""), 1146 Ecosystem: Ptr(""), 1147 PackageVersion: &PackageVersion{}, 1148 Registry: &PackageRegistry{}, 1149 URL: Ptr(""), 1150 VersionCount: Ptr(int64(0)), 1151 } 1152 want := `github.Package{ID:0, Name:"", PackageType:"", HTMLURL:"", Visibility:"", Owner:github.User{}, Repository:github.Repository{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Namespace:"", Description:"", Ecosystem:"", PackageVersion:github.PackageVersion{}, Registry:github.PackageRegistry{}, URL:"", VersionCount:0}` 1153 if got := v.String(); got != want { 1154 t.Errorf("Package.String = %v, want %v", got, want) 1155 } 1156 } 1157 1158 func TestPackageContainerMetadata_String(t *testing.T) { 1159 t.Parallel() 1160 v := PackageContainerMetadata{ 1161 Tags: []string{""}, 1162 } 1163 want := `github.PackageContainerMetadata{Tags:[""]}` 1164 if got := v.String(); got != want { 1165 t.Errorf("PackageContainerMetadata.String = %v, want %v", got, want) 1166 } 1167 } 1168 1169 func TestPackageEventContainerMetadata_String(t *testing.T) { 1170 t.Parallel() 1171 v := PackageEventContainerMetadata{ 1172 Tag: &PackageEventContainerMetadataTag{}, 1173 } 1174 want := `github.PackageEventContainerMetadata{Tag:github.PackageEventContainerMetadataTag{}}` 1175 if got := v.String(); got != want { 1176 t.Errorf("PackageEventContainerMetadata.String = %v, want %v", got, want) 1177 } 1178 } 1179 1180 func TestPackageEventContainerMetadataTag_String(t *testing.T) { 1181 t.Parallel() 1182 v := PackageEventContainerMetadataTag{ 1183 Name: Ptr(""), 1184 Digest: Ptr(""), 1185 } 1186 want := `github.PackageEventContainerMetadataTag{Name:"", Digest:""}` 1187 if got := v.String(); got != want { 1188 t.Errorf("PackageEventContainerMetadataTag.String = %v, want %v", got, want) 1189 } 1190 } 1191 1192 func TestPackageFile_String(t *testing.T) { 1193 t.Parallel() 1194 v := PackageFile{ 1195 DownloadURL: Ptr(""), 1196 ID: Ptr(int64(0)), 1197 Name: Ptr(""), 1198 SHA256: Ptr(""), 1199 SHA1: Ptr(""), 1200 MD5: Ptr(""), 1201 ContentType: Ptr(""), 1202 State: Ptr(""), 1203 Author: &User{}, 1204 Size: Ptr(int64(0)), 1205 CreatedAt: &Timestamp{}, 1206 UpdatedAt: &Timestamp{}, 1207 } 1208 want := `github.PackageFile{DownloadURL:"", ID:0, Name:"", SHA256:"", SHA1:"", MD5:"", ContentType:"", State:"", Author:github.User{}, Size:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 1209 if got := v.String(); got != want { 1210 t.Errorf("PackageFile.String = %v, want %v", got, want) 1211 } 1212 } 1213 1214 func TestPackageMetadata_String(t *testing.T) { 1215 t.Parallel() 1216 v := PackageMetadata{ 1217 PackageType: Ptr(""), 1218 Container: &PackageContainerMetadata{}, 1219 } 1220 want := `github.PackageMetadata{PackageType:"", Container:github.PackageContainerMetadata{}}` 1221 if got := v.String(); got != want { 1222 t.Errorf("PackageMetadata.String = %v, want %v", got, want) 1223 } 1224 } 1225 1226 func TestPackageNPMMetadata_String(t *testing.T) { 1227 t.Parallel() 1228 v := PackageNPMMetadata{ 1229 Name: Ptr(""), 1230 Version: Ptr(""), 1231 NPMUser: Ptr(""), 1232 Description: Ptr(""), 1233 GitHead: Ptr(""), 1234 Homepage: Ptr(""), 1235 License: Ptr(""), 1236 Main: Ptr(""), 1237 ID: Ptr(""), 1238 NodeVersion: Ptr(""), 1239 NPMVersion: Ptr(""), 1240 HasShrinkwrap: Ptr(false), 1241 Keywords: []string{""}, 1242 Files: []string{""}, 1243 OS: []string{""}, 1244 CPU: []string{""}, 1245 Readme: Ptr(""), 1246 InstallationCommand: Ptr(""), 1247 ReleaseID: Ptr(int64(0)), 1248 CommitOID: Ptr(""), 1249 PublishedViaActions: Ptr(false), 1250 DeletedByID: Ptr(int64(0)), 1251 } 1252 want := `github.PackageNPMMetadata{Name:"", Version:"", NPMUser:"", Description:"", GitHead:"", Homepage:"", License:"", Main:"", ID:"", NodeVersion:"", NPMVersion:"", HasShrinkwrap:false, Keywords:[""], Files:[""], OS:[""], CPU:[""], Readme:"", InstallationCommand:"", ReleaseID:0, CommitOID:"", PublishedViaActions:false, DeletedByID:0}` 1253 if got := v.String(); got != want { 1254 t.Errorf("PackageNPMMetadata.String = %v, want %v", got, want) 1255 } 1256 } 1257 1258 func TestPackageNugetMetadata_String(t *testing.T) { 1259 t.Parallel() 1260 v := PackageNugetMetadata{ 1261 Name: Ptr(""), 1262 } 1263 want := `github.PackageNugetMetadata{Name:""}` 1264 if got := v.String(); got != want { 1265 t.Errorf("PackageNugetMetadata.String = %v, want %v", got, want) 1266 } 1267 } 1268 1269 func TestPackageRegistry_String(t *testing.T) { 1270 t.Parallel() 1271 v := PackageRegistry{ 1272 AboutURL: Ptr(""), 1273 Name: Ptr(""), 1274 Type: Ptr(""), 1275 URL: Ptr(""), 1276 Vendor: Ptr(""), 1277 } 1278 want := `github.PackageRegistry{AboutURL:"", Name:"", Type:"", URL:"", Vendor:""}` 1279 if got := v.String(); got != want { 1280 t.Errorf("PackageRegistry.String = %v, want %v", got, want) 1281 } 1282 } 1283 1284 func TestPackageRelease_String(t *testing.T) { 1285 t.Parallel() 1286 v := PackageRelease{ 1287 URL: Ptr(""), 1288 HTMLURL: Ptr(""), 1289 ID: Ptr(int64(0)), 1290 TagName: Ptr(""), 1291 TargetCommitish: Ptr(""), 1292 Name: Ptr(""), 1293 Draft: Ptr(false), 1294 Author: &User{}, 1295 Prerelease: Ptr(false), 1296 CreatedAt: &Timestamp{}, 1297 PublishedAt: &Timestamp{}, 1298 } 1299 want := `github.PackageRelease{URL:"", HTMLURL:"", ID:0, TagName:"", TargetCommitish:"", Name:"", Draft:false, Author:github.User{}, Prerelease:false, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, PublishedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 1300 if got := v.String(); got != want { 1301 t.Errorf("PackageRelease.String = %v, want %v", got, want) 1302 } 1303 } 1304 1305 func TestPackageVersion_String(t *testing.T) { 1306 t.Parallel() 1307 v := PackageVersion{ 1308 ID: Ptr(int64(0)), 1309 Name: Ptr(""), 1310 URL: Ptr(""), 1311 PackageHTMLURL: Ptr(""), 1312 License: Ptr(""), 1313 Description: Ptr(""), 1314 CreatedAt: &Timestamp{}, 1315 UpdatedAt: &Timestamp{}, 1316 Version: Ptr(""), 1317 Summary: Ptr(""), 1318 BodyHTML: Ptr(""), 1319 Release: &PackageRelease{}, 1320 Manifest: Ptr(""), 1321 HTMLURL: Ptr(""), 1322 TagName: Ptr(""), 1323 TargetCommitish: Ptr(""), 1324 TargetOID: Ptr(""), 1325 Draft: Ptr(false), 1326 Prerelease: Ptr(false), 1327 ContainerMetadata: &PackageEventContainerMetadata{}, 1328 NPMMetadata: &PackageNPMMetadata{}, 1329 PackageURL: Ptr(""), 1330 Author: &User{}, 1331 SourceURL: Ptr(""), 1332 InstallationCommand: Ptr(""), 1333 DeletedAt: &Timestamp{}, 1334 } 1335 want := `github.PackageVersion{ID:0, Name:"", URL:"", PackageHTMLURL:"", License:"", Description:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Version:"", Summary:"", BodyHTML:"", Release:github.PackageRelease{}, Manifest:"", HTMLURL:"", TagName:"", TargetCommitish:"", TargetOID:"", Draft:false, Prerelease:false, ContainerMetadata:github.PackageEventContainerMetadata{}, NPMMetadata:github.PackageNPMMetadata{}, PackageURL:"", Author:github.User{}, SourceURL:"", InstallationCommand:"", DeletedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 1336 if got := v.String(); got != want { 1337 t.Errorf("PackageVersion.String = %v, want %v", got, want) 1338 } 1339 } 1340 1341 func TestPackageVersionBody_String(t *testing.T) { 1342 t.Parallel() 1343 v := PackageVersionBody{ 1344 Repo: &Repository{}, 1345 Info: &PackageVersionBodyInfo{}, 1346 } 1347 want := `github.PackageVersionBody{Repo:github.Repository{}, Info:github.PackageVersionBodyInfo{}}` 1348 if got := v.String(); got != want { 1349 t.Errorf("PackageVersionBody.String = %v, want %v", got, want) 1350 } 1351 } 1352 1353 func TestPackageVersionBodyInfo_String(t *testing.T) { 1354 t.Parallel() 1355 v := PackageVersionBodyInfo{ 1356 Type: Ptr(""), 1357 OID: Ptr(""), 1358 Mode: Ptr(int64(0)), 1359 Name: Ptr(""), 1360 Path: Ptr(""), 1361 Size: Ptr(int64(0)), 1362 Collection: Ptr(false), 1363 } 1364 want := `github.PackageVersionBodyInfo{Type:"", OID:"", Mode:0, Name:"", Path:"", Size:0, Collection:false}` 1365 if got := v.String(); got != want { 1366 t.Errorf("PackageVersionBodyInfo.String = %v, want %v", got, want) 1367 } 1368 } 1369 1370 func TestPageStats_String(t *testing.T) { 1371 t.Parallel() 1372 v := PageStats{ 1373 TotalPages: Ptr(0), 1374 } 1375 want := `github.PageStats{TotalPages:0}` 1376 if got := v.String(); got != want { 1377 t.Errorf("PageStats.String = %v, want %v", got, want) 1378 } 1379 } 1380 1381 func TestPlan_String(t *testing.T) { 1382 t.Parallel() 1383 v := Plan{ 1384 Name: Ptr(""), 1385 Space: Ptr(0), 1386 Collaborators: Ptr(0), 1387 PrivateRepos: Ptr(int64(0)), 1388 FilledSeats: Ptr(0), 1389 Seats: Ptr(0), 1390 } 1391 want := `github.Plan{Name:"", Space:0, Collaborators:0, PrivateRepos:0, FilledSeats:0, Seats:0}` 1392 if got := v.String(); got != want { 1393 t.Errorf("Plan.String = %v, want %v", got, want) 1394 } 1395 } 1396 1397 func TestPreReceiveHook_String(t *testing.T) { 1398 t.Parallel() 1399 v := PreReceiveHook{ 1400 ID: Ptr(int64(0)), 1401 Name: Ptr(""), 1402 Enforcement: Ptr(""), 1403 ConfigURL: Ptr(""), 1404 } 1405 want := `github.PreReceiveHook{ID:0, Name:"", Enforcement:"", ConfigURL:""}` 1406 if got := v.String(); got != want { 1407 t.Errorf("PreReceiveHook.String = %v, want %v", got, want) 1408 } 1409 } 1410 1411 func TestPullRequest_String(t *testing.T) { 1412 t.Parallel() 1413 v := PullRequest{ 1414 ID: Ptr(int64(0)), 1415 Number: Ptr(0), 1416 State: Ptr(""), 1417 Locked: Ptr(false), 1418 Title: Ptr(""), 1419 Body: Ptr(""), 1420 CreatedAt: &Timestamp{}, 1421 UpdatedAt: &Timestamp{}, 1422 ClosedAt: &Timestamp{}, 1423 MergedAt: &Timestamp{}, 1424 User: &User{}, 1425 Draft: Ptr(false), 1426 URL: Ptr(""), 1427 HTMLURL: Ptr(""), 1428 IssueURL: Ptr(""), 1429 StatusesURL: Ptr(""), 1430 DiffURL: Ptr(""), 1431 PatchURL: Ptr(""), 1432 CommitsURL: Ptr(""), 1433 CommentsURL: Ptr(""), 1434 ReviewCommentsURL: Ptr(""), 1435 ReviewCommentURL: Ptr(""), 1436 Assignee: &User{}, 1437 Milestone: &Milestone{}, 1438 AuthorAssociation: Ptr(""), 1439 NodeID: Ptr(""), 1440 AutoMerge: &PullRequestAutoMerge{}, 1441 Merged: Ptr(false), 1442 Mergeable: Ptr(false), 1443 MergeableState: Ptr(""), 1444 Rebaseable: Ptr(false), 1445 MergedBy: &User{}, 1446 MergeCommitSHA: Ptr(""), 1447 Comments: Ptr(0), 1448 Commits: Ptr(0), 1449 Additions: Ptr(0), 1450 Deletions: Ptr(0), 1451 ChangedFiles: Ptr(0), 1452 MaintainerCanModify: Ptr(false), 1453 ReviewComments: Ptr(0), 1454 Links: &PRLinks{}, 1455 Head: &PullRequestBranch{}, 1456 Base: &PullRequestBranch{}, 1457 ActiveLockReason: Ptr(""), 1458 } 1459 want := `github.PullRequest{ID:0, Number:0, State:"", Locked:false, Title:"", Body:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, ClosedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, MergedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, User:github.User{}, Draft:false, URL:"", HTMLURL:"", IssueURL:"", StatusesURL:"", DiffURL:"", PatchURL:"", CommitsURL:"", CommentsURL:"", ReviewCommentsURL:"", ReviewCommentURL:"", Assignee:github.User{}, Milestone:github.Milestone{}, AuthorAssociation:"", NodeID:"", AutoMerge:github.PullRequestAutoMerge{}, Merged:false, Mergeable:false, MergeableState:"", Rebaseable:false, MergedBy:github.User{}, MergeCommitSHA:"", Comments:0, Commits:0, Additions:0, Deletions:0, ChangedFiles:0, MaintainerCanModify:false, ReviewComments:0, Links:github.PRLinks{}, Head:github.PullRequestBranch{}, Base:github.PullRequestBranch{}, ActiveLockReason:""}` 1460 if got := v.String(); got != want { 1461 t.Errorf("PullRequest.String = %v, want %v", got, want) 1462 } 1463 } 1464 1465 func TestPullRequestComment_String(t *testing.T) { 1466 t.Parallel() 1467 v := PullRequestComment{ 1468 ID: Ptr(int64(0)), 1469 NodeID: Ptr(""), 1470 InReplyTo: Ptr(int64(0)), 1471 Body: Ptr(""), 1472 Path: Ptr(""), 1473 DiffHunk: Ptr(""), 1474 PullRequestReviewID: Ptr(int64(0)), 1475 Position: Ptr(0), 1476 OriginalPosition: Ptr(0), 1477 StartLine: Ptr(0), 1478 Line: Ptr(0), 1479 OriginalLine: Ptr(0), 1480 OriginalStartLine: Ptr(0), 1481 Side: Ptr(""), 1482 StartSide: Ptr(""), 1483 CommitID: Ptr(""), 1484 OriginalCommitID: Ptr(""), 1485 User: &User{}, 1486 Reactions: &Reactions{}, 1487 CreatedAt: &Timestamp{}, 1488 UpdatedAt: &Timestamp{}, 1489 AuthorAssociation: Ptr(""), 1490 URL: Ptr(""), 1491 HTMLURL: Ptr(""), 1492 PullRequestURL: Ptr(""), 1493 SubjectType: Ptr(""), 1494 } 1495 want := `github.PullRequestComment{ID:0, NodeID:"", InReplyTo:0, Body:"", Path:"", DiffHunk:"", PullRequestReviewID:0, Position:0, OriginalPosition:0, StartLine:0, Line:0, OriginalLine:0, OriginalStartLine:0, Side:"", StartSide:"", CommitID:"", OriginalCommitID:"", User:github.User{}, Reactions:github.Reactions{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, AuthorAssociation:"", URL:"", HTMLURL:"", PullRequestURL:"", SubjectType:""}` 1496 if got := v.String(); got != want { 1497 t.Errorf("PullRequestComment.String = %v, want %v", got, want) 1498 } 1499 } 1500 1501 func TestPullRequestReview_String(t *testing.T) { 1502 t.Parallel() 1503 v := PullRequestReview{ 1504 ID: Ptr(int64(0)), 1505 NodeID: Ptr(""), 1506 User: &User{}, 1507 Body: Ptr(""), 1508 SubmittedAt: &Timestamp{}, 1509 CommitID: Ptr(""), 1510 HTMLURL: Ptr(""), 1511 PullRequestURL: Ptr(""), 1512 State: Ptr(""), 1513 AuthorAssociation: Ptr(""), 1514 } 1515 want := `github.PullRequestReview{ID:0, NodeID:"", User:github.User{}, Body:"", SubmittedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, CommitID:"", HTMLURL:"", PullRequestURL:"", State:"", AuthorAssociation:""}` 1516 if got := v.String(); got != want { 1517 t.Errorf("PullRequestReview.String = %v, want %v", got, want) 1518 } 1519 } 1520 1521 func TestPullRequestReviewDismissalRequest_String(t *testing.T) { 1522 t.Parallel() 1523 v := PullRequestReviewDismissalRequest{ 1524 Message: Ptr(""), 1525 } 1526 want := `github.PullRequestReviewDismissalRequest{Message:""}` 1527 if got := v.String(); got != want { 1528 t.Errorf("PullRequestReviewDismissalRequest.String = %v, want %v", got, want) 1529 } 1530 } 1531 1532 func TestPullRequestReviewRequest_String(t *testing.T) { 1533 t.Parallel() 1534 v := PullRequestReviewRequest{ 1535 NodeID: Ptr(""), 1536 CommitID: Ptr(""), 1537 Body: Ptr(""), 1538 Event: Ptr(""), 1539 } 1540 want := `github.PullRequestReviewRequest{NodeID:"", CommitID:"", Body:"", Event:""}` 1541 if got := v.String(); got != want { 1542 t.Errorf("PullRequestReviewRequest.String = %v, want %v", got, want) 1543 } 1544 } 1545 1546 func TestPullRequestThread_String(t *testing.T) { 1547 t.Parallel() 1548 v := PullRequestThread{ 1549 ID: Ptr(int64(0)), 1550 NodeID: Ptr(""), 1551 } 1552 want := `github.PullRequestThread{ID:0, NodeID:""}` 1553 if got := v.String(); got != want { 1554 t.Errorf("PullRequestThread.String = %v, want %v", got, want) 1555 } 1556 } 1557 1558 func TestPullStats_String(t *testing.T) { 1559 t.Parallel() 1560 v := PullStats{ 1561 TotalPulls: Ptr(0), 1562 MergedPulls: Ptr(0), 1563 MergeablePulls: Ptr(0), 1564 UnmergeablePulls: Ptr(0), 1565 } 1566 want := `github.PullStats{TotalPulls:0, MergedPulls:0, MergeablePulls:0, UnmergeablePulls:0}` 1567 if got := v.String(); got != want { 1568 t.Errorf("PullStats.String = %v, want %v", got, want) 1569 } 1570 } 1571 1572 func TestPushEvent_String(t *testing.T) { 1573 t.Parallel() 1574 v := PushEvent{ 1575 PushID: Ptr(int64(0)), 1576 Head: Ptr(""), 1577 Ref: Ptr(""), 1578 Size: Ptr(0), 1579 Before: Ptr(""), 1580 DistinctSize: Ptr(0), 1581 Action: Ptr(""), 1582 After: Ptr(""), 1583 Created: Ptr(false), 1584 Deleted: Ptr(false), 1585 Forced: Ptr(false), 1586 BaseRef: Ptr(""), 1587 Compare: Ptr(""), 1588 Repo: &PushEventRepository{}, 1589 HeadCommit: &HeadCommit{}, 1590 Pusher: &CommitAuthor{}, 1591 Sender: &User{}, 1592 Installation: &Installation{}, 1593 Organization: &Organization{}, 1594 } 1595 want := `github.PushEvent{PushID:0, Head:"", Ref:"", Size:0, Before:"", DistinctSize:0, Action:"", After:"", Created:false, Deleted:false, Forced:false, BaseRef:"", Compare:"", Repo:github.PushEventRepository{}, HeadCommit:github.HeadCommit{}, Pusher:github.CommitAuthor{}, Sender:github.User{}, Installation:github.Installation{}, Organization:github.Organization{}}` 1596 if got := v.String(); got != want { 1597 t.Errorf("PushEvent.String = %v, want %v", got, want) 1598 } 1599 } 1600 1601 func TestRate_String(t *testing.T) { 1602 t.Parallel() 1603 v := Rate{ 1604 Limit: 0, 1605 Remaining: 0, 1606 Used: 0, 1607 Reset: Timestamp{}, 1608 Resource: "", 1609 } 1610 want := `github.Rate{Limit:0, Remaining:0, Used:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Resource:""}` 1611 if got := v.String(); got != want { 1612 t.Errorf("Rate.String = %v, want %v", got, want) 1613 } 1614 } 1615 1616 func TestReaction_String(t *testing.T) { 1617 t.Parallel() 1618 v := Reaction{ 1619 ID: Ptr(int64(0)), 1620 User: &User{}, 1621 NodeID: Ptr(""), 1622 Content: Ptr(""), 1623 CreatedAt: &Timestamp{}, 1624 } 1625 want := `github.Reaction{ID:0, User:github.User{}, NodeID:"", Content:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 1626 if got := v.String(); got != want { 1627 t.Errorf("Reaction.String = %v, want %v", got, want) 1628 } 1629 } 1630 1631 func TestReference_String(t *testing.T) { 1632 t.Parallel() 1633 v := Reference{ 1634 Ref: Ptr(""), 1635 URL: Ptr(""), 1636 Object: &GitObject{}, 1637 NodeID: Ptr(""), 1638 } 1639 want := `github.Reference{Ref:"", URL:"", Object:github.GitObject{}, NodeID:""}` 1640 if got := v.String(); got != want { 1641 t.Errorf("Reference.String = %v, want %v", got, want) 1642 } 1643 } 1644 1645 func TestReleaseAsset_String(t *testing.T) { 1646 t.Parallel() 1647 v := ReleaseAsset{ 1648 ID: Ptr(int64(0)), 1649 URL: Ptr(""), 1650 Name: Ptr(""), 1651 Label: Ptr(""), 1652 State: Ptr(""), 1653 ContentType: Ptr(""), 1654 Size: Ptr(0), 1655 DownloadCount: Ptr(0), 1656 CreatedAt: &Timestamp{}, 1657 UpdatedAt: &Timestamp{}, 1658 BrowserDownloadURL: Ptr(""), 1659 Uploader: &User{}, 1660 NodeID: Ptr(""), 1661 } 1662 want := `github.ReleaseAsset{ID:0, URL:"", Name:"", Label:"", State:"", ContentType:"", Size:0, DownloadCount:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, BrowserDownloadURL:"", Uploader:github.User{}, NodeID:""}` 1663 if got := v.String(); got != want { 1664 t.Errorf("ReleaseAsset.String = %v, want %v", got, want) 1665 } 1666 } 1667 1668 func TestRename_String(t *testing.T) { 1669 t.Parallel() 1670 v := Rename{ 1671 From: Ptr(""), 1672 To: Ptr(""), 1673 } 1674 want := `github.Rename{From:"", To:""}` 1675 if got := v.String(); got != want { 1676 t.Errorf("Rename.String = %v, want %v", got, want) 1677 } 1678 } 1679 1680 func TestRepoStats_String(t *testing.T) { 1681 t.Parallel() 1682 v := RepoStats{ 1683 TotalRepos: Ptr(0), 1684 RootRepos: Ptr(0), 1685 ForkRepos: Ptr(0), 1686 OrgRepos: Ptr(0), 1687 TotalPushes: Ptr(0), 1688 TotalWikis: Ptr(0), 1689 } 1690 want := `github.RepoStats{TotalRepos:0, RootRepos:0, ForkRepos:0, OrgRepos:0, TotalPushes:0, TotalWikis:0}` 1691 if got := v.String(); got != want { 1692 t.Errorf("RepoStats.String = %v, want %v", got, want) 1693 } 1694 } 1695 1696 func TestRepoStatus_String(t *testing.T) { 1697 t.Parallel() 1698 v := RepoStatus{ 1699 ID: Ptr(int64(0)), 1700 NodeID: Ptr(""), 1701 URL: Ptr(""), 1702 State: Ptr(""), 1703 TargetURL: Ptr(""), 1704 Description: Ptr(""), 1705 Context: Ptr(""), 1706 AvatarURL: Ptr(""), 1707 Creator: &User{}, 1708 CreatedAt: &Timestamp{}, 1709 UpdatedAt: &Timestamp{}, 1710 } 1711 want := `github.RepoStatus{ID:0, NodeID:"", URL:"", State:"", TargetURL:"", Description:"", Context:"", AvatarURL:"", Creator:github.User{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 1712 if got := v.String(); got != want { 1713 t.Errorf("RepoStatus.String = %v, want %v", got, want) 1714 } 1715 } 1716 1717 func TestRepository_String(t *testing.T) { 1718 t.Parallel() 1719 v := Repository{ 1720 ID: Ptr(int64(0)), 1721 NodeID: Ptr(""), 1722 Owner: &User{}, 1723 Name: Ptr(""), 1724 FullName: Ptr(""), 1725 Description: Ptr(""), 1726 Homepage: Ptr(""), 1727 CodeOfConduct: &CodeOfConduct{}, 1728 DefaultBranch: Ptr(""), 1729 MasterBranch: Ptr(""), 1730 CreatedAt: &Timestamp{}, 1731 PushedAt: &Timestamp{}, 1732 UpdatedAt: &Timestamp{}, 1733 HTMLURL: Ptr(""), 1734 CloneURL: Ptr(""), 1735 GitURL: Ptr(""), 1736 MirrorURL: Ptr(""), 1737 SSHURL: Ptr(""), 1738 SVNURL: Ptr(""), 1739 Language: Ptr(""), 1740 Fork: Ptr(false), 1741 ForksCount: Ptr(0), 1742 NetworkCount: Ptr(0), 1743 OpenIssuesCount: Ptr(0), 1744 OpenIssues: Ptr(0), 1745 StargazersCount: Ptr(0), 1746 SubscribersCount: Ptr(0), 1747 WatchersCount: Ptr(0), 1748 Watchers: Ptr(0), 1749 Size: Ptr(0), 1750 AutoInit: Ptr(false), 1751 Parent: &Repository{}, 1752 Source: &Repository{}, 1753 TemplateRepository: &Repository{}, 1754 Organization: &Organization{}, 1755 AllowRebaseMerge: Ptr(false), 1756 AllowUpdateBranch: Ptr(false), 1757 AllowSquashMerge: Ptr(false), 1758 AllowMergeCommit: Ptr(false), 1759 AllowAutoMerge: Ptr(false), 1760 AllowForking: Ptr(false), 1761 WebCommitSignoffRequired: Ptr(false), 1762 DeleteBranchOnMerge: Ptr(false), 1763 UseSquashPRTitleAsDefault: Ptr(false), 1764 SquashMergeCommitTitle: Ptr(""), 1765 SquashMergeCommitMessage: Ptr(""), 1766 MergeCommitTitle: Ptr(""), 1767 MergeCommitMessage: Ptr(""), 1768 Topics: []string{""}, 1769 Archived: Ptr(false), 1770 Disabled: Ptr(false), 1771 License: &License{}, 1772 Private: Ptr(false), 1773 HasIssues: Ptr(false), 1774 HasWiki: Ptr(false), 1775 HasPages: Ptr(false), 1776 HasProjects: Ptr(false), 1777 HasDownloads: Ptr(false), 1778 HasDiscussions: Ptr(false), 1779 IsTemplate: Ptr(false), 1780 LicenseTemplate: Ptr(""), 1781 GitignoreTemplate: Ptr(""), 1782 SecurityAndAnalysis: &SecurityAndAnalysis{}, 1783 TeamID: Ptr(int64(0)), 1784 URL: Ptr(""), 1785 ArchiveURL: Ptr(""), 1786 AssigneesURL: Ptr(""), 1787 BlobsURL: Ptr(""), 1788 BranchesURL: Ptr(""), 1789 CollaboratorsURL: Ptr(""), 1790 CommentsURL: Ptr(""), 1791 CommitsURL: Ptr(""), 1792 CompareURL: Ptr(""), 1793 ContentsURL: Ptr(""), 1794 ContributorsURL: Ptr(""), 1795 DeploymentsURL: Ptr(""), 1796 DownloadsURL: Ptr(""), 1797 EventsURL: Ptr(""), 1798 ForksURL: Ptr(""), 1799 GitCommitsURL: Ptr(""), 1800 GitRefsURL: Ptr(""), 1801 GitTagsURL: Ptr(""), 1802 HooksURL: Ptr(""), 1803 IssueCommentURL: Ptr(""), 1804 IssueEventsURL: Ptr(""), 1805 IssuesURL: Ptr(""), 1806 KeysURL: Ptr(""), 1807 LabelsURL: Ptr(""), 1808 LanguagesURL: Ptr(""), 1809 MergesURL: Ptr(""), 1810 MilestonesURL: Ptr(""), 1811 NotificationsURL: Ptr(""), 1812 PullsURL: Ptr(""), 1813 ReleasesURL: Ptr(""), 1814 StargazersURL: Ptr(""), 1815 StatusesURL: Ptr(""), 1816 SubscribersURL: Ptr(""), 1817 SubscriptionURL: Ptr(""), 1818 TagsURL: Ptr(""), 1819 TreesURL: Ptr(""), 1820 TeamsURL: Ptr(""), 1821 Visibility: Ptr(""), 1822 RoleName: Ptr(""), 1823 } 1824 want := `github.Repository{ID:0, NodeID:"", Owner:github.User{}, Name:"", FullName:"", Description:"", Homepage:"", CodeOfConduct:github.CodeOfConduct{}, DefaultBranch:"", MasterBranch:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, PushedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, HTMLURL:"", CloneURL:"", GitURL:"", MirrorURL:"", SSHURL:"", SVNURL:"", Language:"", Fork:false, ForksCount:0, NetworkCount:0, OpenIssuesCount:0, OpenIssues:0, StargazersCount:0, SubscribersCount:0, WatchersCount:0, Watchers:0, Size:0, AutoInit:false, Parent:github.Repository{}, Source:github.Repository{}, TemplateRepository:github.Repository{}, Organization:github.Organization{}, AllowRebaseMerge:false, AllowUpdateBranch:false, AllowSquashMerge:false, AllowMergeCommit:false, AllowAutoMerge:false, AllowForking:false, WebCommitSignoffRequired:false, DeleteBranchOnMerge:false, UseSquashPRTitleAsDefault:false, SquashMergeCommitTitle:"", SquashMergeCommitMessage:"", MergeCommitTitle:"", MergeCommitMessage:"", Topics:[""], Archived:false, Disabled:false, License:github.License{}, Private:false, HasIssues:false, HasWiki:false, HasPages:false, HasProjects:false, HasDownloads:false, HasDiscussions:false, IsTemplate:false, LicenseTemplate:"", GitignoreTemplate:"", SecurityAndAnalysis:github.SecurityAndAnalysis{}, TeamID:0, URL:"", ArchiveURL:"", AssigneesURL:"", BlobsURL:"", BranchesURL:"", CollaboratorsURL:"", CommentsURL:"", CommitsURL:"", CompareURL:"", ContentsURL:"", ContributorsURL:"", DeploymentsURL:"", DownloadsURL:"", EventsURL:"", ForksURL:"", GitCommitsURL:"", GitRefsURL:"", GitTagsURL:"", HooksURL:"", IssueCommentURL:"", IssueEventsURL:"", IssuesURL:"", KeysURL:"", LabelsURL:"", LanguagesURL:"", MergesURL:"", MilestonesURL:"", NotificationsURL:"", PullsURL:"", ReleasesURL:"", StargazersURL:"", StatusesURL:"", SubscribersURL:"", SubscriptionURL:"", TagsURL:"", TreesURL:"", TeamsURL:"", Visibility:"", RoleName:""}` 1825 if got := v.String(); got != want { 1826 t.Errorf("Repository.String = %v, want %v", got, want) 1827 } 1828 } 1829 1830 func TestRepositoryComment_String(t *testing.T) { 1831 t.Parallel() 1832 v := RepositoryComment{ 1833 HTMLURL: Ptr(""), 1834 URL: Ptr(""), 1835 ID: Ptr(int64(0)), 1836 NodeID: Ptr(""), 1837 CommitID: Ptr(""), 1838 User: &User{}, 1839 Reactions: &Reactions{}, 1840 CreatedAt: &Timestamp{}, 1841 UpdatedAt: &Timestamp{}, 1842 Body: Ptr(""), 1843 Path: Ptr(""), 1844 Position: Ptr(0), 1845 } 1846 want := `github.RepositoryComment{HTMLURL:"", URL:"", ID:0, NodeID:"", CommitID:"", User:github.User{}, Reactions:github.Reactions{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Body:"", Path:"", Position:0}` 1847 if got := v.String(); got != want { 1848 t.Errorf("RepositoryComment.String = %v, want %v", got, want) 1849 } 1850 } 1851 1852 func TestRepositoryCommit_String(t *testing.T) { 1853 t.Parallel() 1854 v := RepositoryCommit{ 1855 NodeID: Ptr(""), 1856 SHA: Ptr(""), 1857 Commit: &Commit{}, 1858 Author: &User{}, 1859 Committer: &User{}, 1860 HTMLURL: Ptr(""), 1861 URL: Ptr(""), 1862 CommentsURL: Ptr(""), 1863 Stats: &CommitStats{}, 1864 } 1865 want := `github.RepositoryCommit{NodeID:"", SHA:"", Commit:github.Commit{}, Author:github.User{}, Committer:github.User{}, HTMLURL:"", URL:"", CommentsURL:"", Stats:github.CommitStats{}}` 1866 if got := v.String(); got != want { 1867 t.Errorf("RepositoryCommit.String = %v, want %v", got, want) 1868 } 1869 } 1870 1871 func TestRepositoryContent_String(t *testing.T) { 1872 t.Parallel() 1873 v := RepositoryContent{ 1874 Type: Ptr(""), 1875 Target: Ptr(""), 1876 Encoding: Ptr(""), 1877 Size: Ptr(0), 1878 Name: Ptr(""), 1879 Path: Ptr(""), 1880 Content: Ptr(""), 1881 SHA: Ptr(""), 1882 URL: Ptr(""), 1883 GitURL: Ptr(""), 1884 HTMLURL: Ptr(""), 1885 DownloadURL: Ptr(""), 1886 SubmoduleGitURL: Ptr(""), 1887 } 1888 want := `github.RepositoryContent{Type:"", Target:"", Encoding:"", Size:0, Name:"", Path:"", Content:"", SHA:"", URL:"", GitURL:"", HTMLURL:"", DownloadURL:"", SubmoduleGitURL:""}` 1889 if got := v.String(); got != want { 1890 t.Errorf("RepositoryContent.String = %v, want %v", got, want) 1891 } 1892 } 1893 1894 func TestRepositoryLicense_String(t *testing.T) { 1895 t.Parallel() 1896 v := RepositoryLicense{ 1897 Name: Ptr(""), 1898 Path: Ptr(""), 1899 SHA: Ptr(""), 1900 Size: Ptr(0), 1901 URL: Ptr(""), 1902 HTMLURL: Ptr(""), 1903 GitURL: Ptr(""), 1904 DownloadURL: Ptr(""), 1905 Type: Ptr(""), 1906 Content: Ptr(""), 1907 Encoding: Ptr(""), 1908 License: &License{}, 1909 } 1910 want := `github.RepositoryLicense{Name:"", Path:"", SHA:"", Size:0, URL:"", HTMLURL:"", GitURL:"", DownloadURL:"", Type:"", Content:"", Encoding:"", License:github.License{}}` 1911 if got := v.String(); got != want { 1912 t.Errorf("RepositoryLicense.String = %v, want %v", got, want) 1913 } 1914 } 1915 1916 func TestRepositoryParticipation_String(t *testing.T) { 1917 t.Parallel() 1918 v := RepositoryParticipation{ 1919 All: []int{0}, 1920 Owner: []int{0}, 1921 } 1922 want := `github.RepositoryParticipation{All:[0], Owner:[0]}` 1923 if got := v.String(); got != want { 1924 t.Errorf("RepositoryParticipation.String = %v, want %v", got, want) 1925 } 1926 } 1927 1928 func TestRepositoryRelease_String(t *testing.T) { 1929 t.Parallel() 1930 v := RepositoryRelease{ 1931 TagName: Ptr(""), 1932 TargetCommitish: Ptr(""), 1933 Name: Ptr(""), 1934 Body: Ptr(""), 1935 Draft: Ptr(false), 1936 Prerelease: Ptr(false), 1937 MakeLatest: Ptr(""), 1938 DiscussionCategoryName: Ptr(""), 1939 GenerateReleaseNotes: Ptr(false), 1940 ID: Ptr(int64(0)), 1941 CreatedAt: &Timestamp{}, 1942 PublishedAt: &Timestamp{}, 1943 URL: Ptr(""), 1944 HTMLURL: Ptr(""), 1945 AssetsURL: Ptr(""), 1946 UploadURL: Ptr(""), 1947 ZipballURL: Ptr(""), 1948 TarballURL: Ptr(""), 1949 Author: &User{}, 1950 NodeID: Ptr(""), 1951 } 1952 want := `github.RepositoryRelease{TagName:"", TargetCommitish:"", Name:"", Body:"", Draft:false, Prerelease:false, MakeLatest:"", DiscussionCategoryName:"", GenerateReleaseNotes:false, ID:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, PublishedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, URL:"", HTMLURL:"", AssetsURL:"", UploadURL:"", ZipballURL:"", TarballURL:"", Author:github.User{}, NodeID:""}` 1953 if got := v.String(); got != want { 1954 t.Errorf("RepositoryRelease.String = %v, want %v", got, want) 1955 } 1956 } 1957 1958 func TestSBOM_String(t *testing.T) { 1959 t.Parallel() 1960 v := SBOM{ 1961 SBOM: &SBOMInfo{}, 1962 } 1963 want := `github.SBOM{SBOM:github.SBOMInfo{}}` 1964 if got := v.String(); got != want { 1965 t.Errorf("SBOM.String = %v, want %v", got, want) 1966 } 1967 } 1968 1969 func TestSSHSigningKey_String(t *testing.T) { 1970 t.Parallel() 1971 v := SSHSigningKey{ 1972 ID: Ptr(int64(0)), 1973 Key: Ptr(""), 1974 Title: Ptr(""), 1975 CreatedAt: &Timestamp{}, 1976 } 1977 want := `github.SSHSigningKey{ID:0, Key:"", Title:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 1978 if got := v.String(); got != want { 1979 t.Errorf("SSHSigningKey.String = %v, want %v", got, want) 1980 } 1981 } 1982 1983 func TestSecretScanning_String(t *testing.T) { 1984 t.Parallel() 1985 v := SecretScanning{ 1986 Status: Ptr(""), 1987 } 1988 want := `github.SecretScanning{Status:""}` 1989 if got := v.String(); got != want { 1990 t.Errorf("SecretScanning.String = %v, want %v", got, want) 1991 } 1992 } 1993 1994 func TestSecretScanningPushProtection_String(t *testing.T) { 1995 t.Parallel() 1996 v := SecretScanningPushProtection{ 1997 Status: Ptr(""), 1998 } 1999 want := `github.SecretScanningPushProtection{Status:""}` 2000 if got := v.String(); got != want { 2001 t.Errorf("SecretScanningPushProtection.String = %v, want %v", got, want) 2002 } 2003 } 2004 2005 func TestSecurityAndAnalysis_String(t *testing.T) { 2006 t.Parallel() 2007 v := SecurityAndAnalysis{ 2008 AdvancedSecurity: &AdvancedSecurity{}, 2009 SecretScanning: &SecretScanning{}, 2010 SecretScanningPushProtection: &SecretScanningPushProtection{}, 2011 DependabotSecurityUpdates: &DependabotSecurityUpdates{}, 2012 SecretScanningValidityChecks: &SecretScanningValidityChecks{}, 2013 } 2014 want := `github.SecurityAndAnalysis{AdvancedSecurity:github.AdvancedSecurity{}, SecretScanning:github.SecretScanning{}, SecretScanningPushProtection:github.SecretScanningPushProtection{}, DependabotSecurityUpdates:github.DependabotSecurityUpdates{}, SecretScanningValidityChecks:github.SecretScanningValidityChecks{}}` 2015 if got := v.String(); got != want { 2016 t.Errorf("SecurityAndAnalysis.String = %v, want %v", got, want) 2017 } 2018 } 2019 2020 func TestSourceImportAuthor_String(t *testing.T) { 2021 t.Parallel() 2022 v := SourceImportAuthor{ 2023 ID: Ptr(int64(0)), 2024 RemoteID: Ptr(""), 2025 RemoteName: Ptr(""), 2026 Email: Ptr(""), 2027 Name: Ptr(""), 2028 URL: Ptr(""), 2029 ImportURL: Ptr(""), 2030 } 2031 want := `github.SourceImportAuthor{ID:0, RemoteID:"", RemoteName:"", Email:"", Name:"", URL:"", ImportURL:""}` 2032 if got := v.String(); got != want { 2033 t.Errorf("SourceImportAuthor.String = %v, want %v", got, want) 2034 } 2035 } 2036 2037 func TestTeam_String(t *testing.T) { 2038 t.Parallel() 2039 v := Team{ 2040 ID: Ptr(int64(0)), 2041 NodeID: Ptr(""), 2042 Name: Ptr(""), 2043 Description: Ptr(""), 2044 URL: Ptr(""), 2045 Slug: Ptr(""), 2046 Permission: Ptr(""), 2047 Privacy: Ptr(""), 2048 NotificationSetting: Ptr(""), 2049 MembersCount: Ptr(0), 2050 ReposCount: Ptr(0), 2051 Organization: &Organization{}, 2052 HTMLURL: Ptr(""), 2053 MembersURL: Ptr(""), 2054 RepositoriesURL: Ptr(""), 2055 Parent: &Team{}, 2056 LDAPDN: Ptr(""), 2057 Assignment: Ptr(""), 2058 } 2059 want := `github.Team{ID:0, NodeID:"", Name:"", Description:"", URL:"", Slug:"", Permission:"", Privacy:"", NotificationSetting:"", MembersCount:0, ReposCount:0, Organization:github.Organization{}, HTMLURL:"", MembersURL:"", RepositoriesURL:"", Parent:github.Team{}, LDAPDN:"", Assignment:""}` 2060 if got := v.String(); got != want { 2061 t.Errorf("Team.String = %v, want %v", got, want) 2062 } 2063 } 2064 2065 func TestTeamDiscussion_String(t *testing.T) { 2066 t.Parallel() 2067 v := TeamDiscussion{ 2068 Author: &User{}, 2069 Body: Ptr(""), 2070 BodyHTML: Ptr(""), 2071 BodyVersion: Ptr(""), 2072 CommentsCount: Ptr(0), 2073 CommentsURL: Ptr(""), 2074 CreatedAt: &Timestamp{}, 2075 LastEditedAt: &Timestamp{}, 2076 HTMLURL: Ptr(""), 2077 NodeID: Ptr(""), 2078 Number: Ptr(0), 2079 Pinned: Ptr(false), 2080 Private: Ptr(false), 2081 TeamURL: Ptr(""), 2082 Title: Ptr(""), 2083 UpdatedAt: &Timestamp{}, 2084 URL: Ptr(""), 2085 Reactions: &Reactions{}, 2086 } 2087 want := `github.TeamDiscussion{Author:github.User{}, Body:"", BodyHTML:"", BodyVersion:"", CommentsCount:0, CommentsURL:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, LastEditedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, HTMLURL:"", NodeID:"", Number:0, Pinned:false, Private:false, TeamURL:"", Title:"", UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, URL:"", Reactions:github.Reactions{}}` 2088 if got := v.String(); got != want { 2089 t.Errorf("TeamDiscussion.String = %v, want %v", got, want) 2090 } 2091 } 2092 2093 func TestTeamLDAPMapping_String(t *testing.T) { 2094 t.Parallel() 2095 v := TeamLDAPMapping{ 2096 ID: Ptr(int64(0)), 2097 LDAPDN: Ptr(""), 2098 URL: Ptr(""), 2099 Name: Ptr(""), 2100 Slug: Ptr(""), 2101 Description: Ptr(""), 2102 Privacy: Ptr(""), 2103 Permission: Ptr(""), 2104 MembersURL: Ptr(""), 2105 RepositoriesURL: Ptr(""), 2106 } 2107 want := `github.TeamLDAPMapping{ID:0, LDAPDN:"", URL:"", Name:"", Slug:"", Description:"", Privacy:"", Permission:"", MembersURL:"", RepositoriesURL:""}` 2108 if got := v.String(); got != want { 2109 t.Errorf("TeamLDAPMapping.String = %v, want %v", got, want) 2110 } 2111 } 2112 2113 func TestTextMatch_String(t *testing.T) { 2114 t.Parallel() 2115 v := TextMatch{ 2116 ObjectURL: Ptr(""), 2117 ObjectType: Ptr(""), 2118 Property: Ptr(""), 2119 Fragment: Ptr(""), 2120 } 2121 want := `github.TextMatch{ObjectURL:"", ObjectType:"", Property:"", Fragment:""}` 2122 if got := v.String(); got != want { 2123 t.Errorf("TextMatch.String = %v, want %v", got, want) 2124 } 2125 } 2126 2127 func TestTree_String(t *testing.T) { 2128 t.Parallel() 2129 v := Tree{ 2130 SHA: Ptr(""), 2131 Truncated: Ptr(false), 2132 } 2133 want := `github.Tree{SHA:"", Truncated:false}` 2134 if got := v.String(); got != want { 2135 t.Errorf("Tree.String = %v, want %v", got, want) 2136 } 2137 } 2138 2139 func TestTreeEntry_String(t *testing.T) { 2140 t.Parallel() 2141 v := TreeEntry{ 2142 SHA: Ptr(""), 2143 Path: Ptr(""), 2144 Mode: Ptr(""), 2145 Type: Ptr(""), 2146 Size: Ptr(0), 2147 Content: Ptr(""), 2148 URL: Ptr(""), 2149 } 2150 want := `github.TreeEntry{SHA:"", Path:"", Mode:"", Type:"", Size:0, Content:"", URL:""}` 2151 if got := v.String(); got != want { 2152 t.Errorf("TreeEntry.String = %v, want %v", got, want) 2153 } 2154 } 2155 2156 func TestUser_String(t *testing.T) { 2157 t.Parallel() 2158 v := User{ 2159 Login: Ptr(""), 2160 ID: Ptr(int64(0)), 2161 NodeID: Ptr(""), 2162 AvatarURL: Ptr(""), 2163 HTMLURL: Ptr(""), 2164 GravatarID: Ptr(""), 2165 Name: Ptr(""), 2166 Company: Ptr(""), 2167 Blog: Ptr(""), 2168 Location: Ptr(""), 2169 Email: Ptr(""), 2170 Hireable: Ptr(false), 2171 Bio: Ptr(""), 2172 TwitterUsername: Ptr(""), 2173 PublicRepos: Ptr(0), 2174 PublicGists: Ptr(0), 2175 Followers: Ptr(0), 2176 Following: Ptr(0), 2177 CreatedAt: &Timestamp{}, 2178 UpdatedAt: &Timestamp{}, 2179 SuspendedAt: &Timestamp{}, 2180 Type: Ptr(""), 2181 SiteAdmin: Ptr(false), 2182 TotalPrivateRepos: Ptr(int64(0)), 2183 OwnedPrivateRepos: Ptr(int64(0)), 2184 PrivateGists: Ptr(0), 2185 DiskUsage: Ptr(0), 2186 Collaborators: Ptr(0), 2187 TwoFactorAuthentication: Ptr(false), 2188 Plan: &Plan{}, 2189 LdapDn: Ptr(""), 2190 URL: Ptr(""), 2191 EventsURL: Ptr(""), 2192 FollowingURL: Ptr(""), 2193 FollowersURL: Ptr(""), 2194 GistsURL: Ptr(""), 2195 OrganizationsURL: Ptr(""), 2196 ReceivedEventsURL: Ptr(""), 2197 ReposURL: Ptr(""), 2198 StarredURL: Ptr(""), 2199 SubscriptionsURL: Ptr(""), 2200 RoleName: Ptr(""), 2201 Assignment: Ptr(""), 2202 } 2203 want := `github.User{Login:"", ID:0, NodeID:"", AvatarURL:"", HTMLURL:"", GravatarID:"", Name:"", Company:"", Blog:"", Location:"", Email:"", Hireable:false, Bio:"", TwitterUsername:"", PublicRepos:0, PublicGists:0, Followers:0, Following:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, SuspendedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Type:"", SiteAdmin:false, TotalPrivateRepos:0, OwnedPrivateRepos:0, PrivateGists:0, DiskUsage:0, Collaborators:0, TwoFactorAuthentication:false, Plan:github.Plan{}, LdapDn:"", URL:"", EventsURL:"", FollowingURL:"", FollowersURL:"", GistsURL:"", OrganizationsURL:"", ReceivedEventsURL:"", ReposURL:"", StarredURL:"", SubscriptionsURL:"", RoleName:"", Assignment:""}` 2204 if got := v.String(); got != want { 2205 t.Errorf("User.String = %v, want %v", got, want) 2206 } 2207 } 2208 2209 func TestUserLDAPMapping_String(t *testing.T) { 2210 t.Parallel() 2211 v := UserLDAPMapping{ 2212 ID: Ptr(int64(0)), 2213 LDAPDN: Ptr(""), 2214 Login: Ptr(""), 2215 AvatarURL: Ptr(""), 2216 GravatarID: Ptr(""), 2217 Type: Ptr(""), 2218 SiteAdmin: Ptr(false), 2219 URL: Ptr(""), 2220 EventsURL: Ptr(""), 2221 FollowingURL: Ptr(""), 2222 FollowersURL: Ptr(""), 2223 GistsURL: Ptr(""), 2224 OrganizationsURL: Ptr(""), 2225 ReceivedEventsURL: Ptr(""), 2226 ReposURL: Ptr(""), 2227 StarredURL: Ptr(""), 2228 SubscriptionsURL: Ptr(""), 2229 } 2230 want := `github.UserLDAPMapping{ID:0, LDAPDN:"", Login:"", AvatarURL:"", GravatarID:"", Type:"", SiteAdmin:false, URL:"", EventsURL:"", FollowingURL:"", FollowersURL:"", GistsURL:"", OrganizationsURL:"", ReceivedEventsURL:"", ReposURL:"", StarredURL:"", SubscriptionsURL:""}` 2231 if got := v.String(); got != want { 2232 t.Errorf("UserLDAPMapping.String = %v, want %v", got, want) 2233 } 2234 } 2235 2236 func TestUserMigration_String(t *testing.T) { 2237 t.Parallel() 2238 v := UserMigration{ 2239 ID: Ptr(int64(0)), 2240 GUID: Ptr(""), 2241 State: Ptr(""), 2242 LockRepositories: Ptr(false), 2243 ExcludeAttachments: Ptr(false), 2244 URL: Ptr(""), 2245 CreatedAt: Ptr(""), 2246 UpdatedAt: Ptr(""), 2247 } 2248 want := `github.UserMigration{ID:0, GUID:"", State:"", LockRepositories:false, ExcludeAttachments:false, URL:"", CreatedAt:"", UpdatedAt:""}` 2249 if got := v.String(); got != want { 2250 t.Errorf("UserMigration.String = %v, want %v", got, want) 2251 } 2252 } 2253 2254 func TestUserStats_String(t *testing.T) { 2255 t.Parallel() 2256 v := UserStats{ 2257 TotalUsers: Ptr(0), 2258 AdminUsers: Ptr(0), 2259 SuspendedUsers: Ptr(0), 2260 } 2261 want := `github.UserStats{TotalUsers:0, AdminUsers:0, SuspendedUsers:0}` 2262 if got := v.String(); got != want { 2263 t.Errorf("UserStats.String = %v, want %v", got, want) 2264 } 2265 } 2266 2267 func TestWeeklyCommitActivity_String(t *testing.T) { 2268 t.Parallel() 2269 v := WeeklyCommitActivity{ 2270 Days: []int{0}, 2271 Total: Ptr(0), 2272 Week: &Timestamp{}, 2273 } 2274 want := `github.WeeklyCommitActivity{Days:[0], Total:0, Week:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 2275 if got := v.String(); got != want { 2276 t.Errorf("WeeklyCommitActivity.String = %v, want %v", got, want) 2277 } 2278 } 2279 2280 func TestWeeklyStats_String(t *testing.T) { 2281 t.Parallel() 2282 v := WeeklyStats{ 2283 Week: &Timestamp{}, 2284 Additions: Ptr(0), 2285 Deletions: Ptr(0), 2286 Commits: Ptr(0), 2287 } 2288 want := `github.WeeklyStats{Week:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Additions:0, Deletions:0, Commits:0}` 2289 if got := v.String(); got != want { 2290 t.Errorf("WeeklyStats.String = %v, want %v", got, want) 2291 } 2292 }