ftp/constants_test.go

19 lines
454 B
Go
Raw Normal View History

2019-01-26 09:10:51 +01:00
package ftp
import (
"testing"
2019-01-26 09:10:51 +01:00
"github.com/stretchr/testify/assert"
)
2019-01-26 09:10:51 +01: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())
}