github.com/djenriquez/nomad-1@v0.8.1/helper/useragent/useragent_test.go (about) 1 package useragent 2 3 import ( 4 "testing" 5 ) 6 7 func TestUserAgent(t *testing.T) { 8 projectURL = "https://nomad-test.com" 9 rt = "go5.0" 10 versionFunc = func() string { return "1.2.3" } 11 12 act := String() 13 14 exp := "Nomad/1.2.3 (+https://nomad-test.com; go5.0)" 15 if exp != act { 16 t.Errorf("expected %q to be %q", act, exp) 17 } 18 }