photoprism/internal/api/preview_test.go
2020-02-03 15:50:46 +01:00

17 lines
338 B
Go

package api
import (
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetPreview(t *testing.T) {
t.Run("invalid type", func(t *testing.T) {
app, router, ctx := NewApiTest()
GetPreview(router, ctx)
result := PerformRequest(app, "GET", "/api/v1/preview")
assert.Equal(t, http.StatusOK, result.Code)
})
}