2019-01-26 09:10:51 +01:00
|
|
|
package ftp
|
|
|
|
|
2020-07-08 08:23:44 +02:00
|
|
|
import (
|
|
|
|
"testing"
|
2019-01-26 09:10:51 +01:00
|
|
|
|
2020-07-08 08:23:44 +02:00
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
2019-01-26 09:10:51 +01:00
|
|
|
|
2020-07-08 08:23:44 +02:00
|
|
|
func TestStatusText(t *testing.T) {
|
|
|
|
assert.Equal(t, "Unknown status code: 0", StatusText(0))
|
|
|
|
assert.Equal(t, "Invalid username or password.", StatusText(StatusInvalidCredentials))
|
2019-01-26 09:10:51 +01:00
|
|
|
}
|
2022-03-09 00:57:09 +01:00
|
|
|
|
|
|
|
func TestEntryTypeString(t *testing.T) {
|
|
|
|
assert.Equal(t, "file", EntryTypeFile.String())
|
|
|
|
assert.Equal(t, "folder", EntryTypeFolder.String())
|
|
|
|
assert.Equal(t, "link", EntryTypeLink.String())
|
|
|
|
}
|