auth_test.go 316 B

12345678910111213141516
  1. package http
  2. import (
  3. "strings"
  4. "testing"
  5. )
  6. func TestHelpPrefixAuth(t *testing.T) {
  7. // This test assumes template variables are placed correctly.
  8. const testPrefix = "server-help-test"
  9. helpMessage := AuthHelp(testPrefix)
  10. if !strings.Contains(helpMessage, testPrefix) {
  11. t.Fatal("flag prefix not found")
  12. }
  13. }