Add tests for EntryType
This commit is contained in:
18
constants_test.go
Normal file
18
constants_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package ftp
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestStatusText(t *testing.T) {
|
||||
assert.Equal(t, "Unknown status code: 0", StatusText(0))
|
||||
assert.Equal(t, "Invalid username or password.", StatusText(StatusInvalidCredentials))
|
||||
}
|
||||
|
||||
func TestEntryTypeString(t *testing.T) {
|
||||
assert.Equal(t, "file", EntryTypeFile.String())
|
||||
assert.Equal(t, "folder", EntryTypeFolder.String())
|
||||
assert.Equal(t, "link", EntryTypeLink.String())
|
||||
}
|
||||
Reference in New Issue
Block a user