diff options
Diffstat (limited to 'modules/repository/license_test.go')
-rw-r--r-- | modules/repository/license_test.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/repository/license_test.go b/modules/repository/license_test.go index 13c865693c..3b0cfa1eed 100644 --- a/modules/repository/license_test.go +++ b/modules/repository/license_test.go @@ -13,7 +13,7 @@ import ( func Test_getLicense(t *testing.T) { type args struct { name string - values *licenseValues + values *LicenseValues } tests := []struct { name string @@ -25,7 +25,7 @@ func Test_getLicense(t *testing.T) { name: "regular", args: args{ name: "MIT", - values: &licenseValues{Owner: "Gitea", Year: "2023"}, + values: &LicenseValues{Owner: "Gitea", Year: "2023"}, }, want: `MIT License @@ -49,11 +49,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := getLicense(tt.args.name, tt.args.values) - if !tt.wantErr(t, err, fmt.Sprintf("getLicense(%v, %v)", tt.args.name, tt.args.values)) { + got, err := GetLicense(tt.args.name, tt.args.values) + if !tt.wantErr(t, err, fmt.Sprintf("GetLicense(%v, %v)", tt.args.name, tt.args.values)) { return } - assert.Equalf(t, tt.want, string(got), "getLicense(%v, %v)", tt.args.name, tt.args.values) + assert.Equalf(t, tt.want, string(got), "GetLicense(%v, %v)", tt.args.name, tt.args.values) }) } } @@ -61,7 +61,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI func Test_fillLicensePlaceholder(t *testing.T) { type args struct { name string - values *licenseValues + values *LicenseValues origin string } tests := []struct { @@ -73,7 +73,7 @@ func Test_fillLicensePlaceholder(t *testing.T) { name: "owner", args: args{ name: "regular", - values: &licenseValues{Year: "2023", Owner: "Gitea", Email: "teabot@gitea.io", Repo: "gitea"}, + values: &LicenseValues{Year: "2023", Owner: "Gitea", Email: "teabot@gitea.io", Repo: "gitea"}, origin: ` <name of author> <owner> @@ -104,7 +104,7 @@ Gitea name: "email", args: args{ name: "regular", - values: &licenseValues{Year: "2023", Owner: "Gitea", Email: "teabot@gitea.io", Repo: "gitea"}, + values: &LicenseValues{Year: "2023", Owner: "Gitea", Email: "teabot@gitea.io", Repo: "gitea"}, origin: ` [EMAIL] `, @@ -117,7 +117,7 @@ teabot@gitea.io name: "repo", args: args{ name: "regular", - values: &licenseValues{Year: "2023", Owner: "Gitea", Email: "teabot@gitea.io", Repo: "gitea"}, + values: &LicenseValues{Year: "2023", Owner: "Gitea", Email: "teabot@gitea.io", Repo: "gitea"}, origin: ` <program> <one line to give the program's name and a brief idea of what it does.> @@ -132,7 +132,7 @@ gitea name: "year", args: args{ name: "regular", - values: &licenseValues{Year: "2023", Owner: "Gitea", Email: "teabot@gitea.io", Repo: "gitea"}, + values: &LicenseValues{Year: "2023", Owner: "Gitea", Email: "teabot@gitea.io", Repo: "gitea"}, origin: ` <year> [YEAR] @@ -155,7 +155,7 @@ gitea name: "0BSD", args: args{ name: "0BSD", - values: &licenseValues{Year: "2023", Owner: "Gitea", Email: "teabot@gitea.io", Repo: "gitea"}, + values: &LicenseValues{Year: "2023", Owner: "Gitea", Email: "teabot@gitea.io", Repo: "gitea"}, origin: ` Copyright (C) YEAR by AUTHOR EMAIL |