photoprism/pkg/clean/username_test.go

20 lines
384 B
Go
Raw Normal View History

package clean
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestUsername(t *testing.T) {
t.Run("Admin ", func(t *testing.T) {
assert.Equal(t, "admin", Username("Admin "))
})
t.Run(" Admin ", func(t *testing.T) {
assert.Equal(t, "admin", Username(" Admin "))
})
t.Run(" admin ", func(t *testing.T) {
assert.Equal(t, "admin", Username(" admin "))
})
}