status_test.go 339 B

1234567891011121314151617
  1. package ftp
  2. import "testing"
  3. func TestValidStatusText(t *testing.T) {
  4. txt := StatusText(StatusInvalidCredentials)
  5. if txt == "" {
  6. t.Fatal("exptected status text, got empty string")
  7. }
  8. }
  9. func TestInvalidStatusText(t *testing.T) {
  10. txt := StatusText(0)
  11. if txt != "" {
  12. t.Fatalf("got status text %q, expected empty string", txt)
  13. }
  14. }