diff --git a/internal/api/preview_test.go b/internal/api/preview_test.go new file mode 100644 index 000000000..e8a3d3161 --- /dev/null +++ b/internal/api/preview_test.go @@ -0,0 +1,17 @@ +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) + }) +}