photoprism/internal/api/preview_test.go
Michael Mayer 5d59b50912 Sharing: ACL authorization for REST API #18
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-06-25 14:54:04 +02:00

18 lines
324 B
Go

package api
import (
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetPreview(t *testing.T) {
t.Run("not found", func(t *testing.T) {
app, router, _ := NewApiTest()
GetPreview(router)
r := PerformRequest(app, "GET", "/api/v1/preview")
assert.Equal(t, http.StatusNotFound, r.Code)
})
}