f5a8c5a45d
Signed-off-by: Michael Mayer <michael@photoprism.app>
23 lines
481 B
Go
23 lines
481 B
Go
package session
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/photoprism/photoprism/internal/config"
|
|
"github.com/photoprism/photoprism/pkg/clean"
|
|
)
|
|
|
|
func TestSession_Public(t *testing.T) {
|
|
s := New(time.Hour, config.TestConfig())
|
|
|
|
sess := s.Public()
|
|
|
|
assert.NotNil(t, sess)
|
|
assert.Truef(t, s.Exists(sess.ID), "session %s should exist", clean.LogQuote(sess.ID))
|
|
assert.Equal(t, PublicID, sess.ID)
|
|
|
|
// t.Logf("Public Session: %#v", sess)
|
|
}
|