photoprism/internal/entity/link_test.go
Michael Mayer 722d7dd421 Improve link sharing dialog and api #18
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-06-22 15:16:26 +02:00

15 lines
375 B
Go

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