Add tests for StatusText
This commit is contained in:
parent
b218223d02
commit
8019e67744
17
status_test.go
Normal file
17
status_test.go
Normal file
@ -0,0 +1,17 @@
|
||||
package ftp
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestValidStatusText(t *testing.T) {
|
||||
txt := StatusText(StatusInvalidCredentials)
|
||||
if txt == "" {
|
||||
t.Fatal("exptected status text, got empty string")
|
||||
}
|
||||
}
|
||||
|
||||
func TestInvalidStatusText(t *testing.T) {
|
||||
txt := StatusText(0)
|
||||
if txt != "" {
|
||||
t.Fatalf("got status text %q, expected empty string", txt)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user