discord-auto-upload/version/version_test.go

22 lines
438 B
Go
Raw Normal View History

package version
2021-06-17 18:47:59 +09:30
import (
"testing"
)
func TestVersioningUpdate(t *testing.T) {
// pretend there is a new version
LatestVersion = "v0.13.0"
if !UpdateAvailable() {
t.Error("should be a version newer than " + CurrentVersion)
}
}
func TestVersioningNoUpdate(t *testing.T) {
// pretend there is a new version
LatestVersion = "v0.12.1"
if UpdateAvailable() {
t.Error("should NOT be a version newer than " + CurrentVersion)
2021-06-17 18:47:59 +09:30
}
}