diff --git a/.gitignore b/.gitignore index 5999076..92d7c40 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -semver-gen \ No newline at end of file +semver-gen +coverage.out \ No newline at end of file diff --git a/cmd/github_test.go b/cmd/github_test.go index 098a644..21babbd 100644 --- a/cmd/github_test.go +++ b/cmd/github_test.go @@ -1,6 +1,8 @@ package cmd -import "testing" +import ( + "testing" +) func Test_checkLatestRelease(t *testing.T) { tests := []struct { @@ -22,3 +24,22 @@ func Test_checkLatestRelease(t *testing.T) { }) } } + +func Test_updatePackage(t *testing.T) { + tests := []struct { + name string + want bool + }{ + { + name: "Run autoupdater", + want: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := updatePackage(); got != tt.want { + t.Errorf("updatePackage() = %v, want %v", got, tt.want) + } + }) + } +}