photoprism/internal/entity/link_test.go

16 lines
375 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("st9lxuqxpogaaba1", true, false)
assert.Equal(t, "st9lxuqxpogaaba1", link.ShareUID)
2020-05-08 11:46:09 +02:00
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))
2020-05-08 11:46:09 +02:00
}