diff --git a/cmd/github_test.go b/cmd/github_test.go new file mode 100644 index 0000000..098a644 --- /dev/null +++ b/cmd/github_test.go @@ -0,0 +1,24 @@ +package cmd + +import "testing" + +func Test_checkLatestRelease(t *testing.T) { + tests := []struct { + name string + want string + want1 bool + }{ + { + name: "Check latest release", + want1: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, got1 := checkLatestRelease() + if got1 != tt.want1 { + t.Errorf("checkLatestRelease() got1 = %v, want %v", got1, tt.want1) + } + }) + } +} diff --git a/cmd/main_test.go b/cmd/main_test.go index 2750f27..55c22f9 100644 --- a/cmd/main_test.go +++ b/cmd/main_test.go @@ -38,6 +38,7 @@ var ( func (suite *Tests) SetupTest() { os.Chdir(testCurrentPath) assert = assertions.New(suite.T()) + varDebug = true } func TestSuite(t *testing.T) {