photoprism/internal/api/preview_test.go

18 lines
324 B
Go
Raw Normal View History

2020-02-03 14:50:46 +00:00
package api
import (
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetPreview(t *testing.T) {
2020-05-13 18:05:33 +00:00
t.Run("not found", func(t *testing.T) {
app, router, _ := NewApiTest()
GetPreview(router)
2020-05-06 10:56:13 +00:00
r := PerformRequest(app, "GET", "/api/v1/preview")
2020-05-13 18:05:33 +00:00
assert.Equal(t, http.StatusNotFound, r.Code)
2020-02-03 14:50:46 +00:00
})
}