photoprism/internal/entity/link_test.go
2020-05-08 11:46:09 +02:00

14 lines
322 B
Go

package entity
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestNewLink(t *testing.T) {
link := NewLink("passwd12", true, false)
assert.Equal(t, "passwd12", link.LinkPassword)
assert.Equal(t, false, link.CanEdit)
assert.Equal(t, true, link.CanComment)
assert.Equal(t, 10, len(link.LinkToken))
}