photoprism/internal/entity/link_test.go

15 lines
322 B
Go
Raw Normal View History

2020-05-08 11:46:09 +02:00
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))
}