From 3f5b78459661d8b2d9d6c3edf5a4010fc4a53909 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 31 Jan 2019 16:19:53 +0000 Subject: [PATCH] test: rich media: parser: add malformed data regression test --- test/web/rich_media/parser_test.exs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/web/rich_media/parser_test.exs b/test/web/rich_media/parser_test.exs index 93a58c528..47b127cf9 100644 --- a/test/web/rich_media/parser_test.exs +++ b/test/web/rich_media/parser_test.exs @@ -88,4 +88,8 @@ defmodule Pleroma.Web.RichMedia.ParserTest do width: "1024" }} end + + test "rejects invalid OGP data" do + assert {:error, _} = Pleroma.Web.RichMedia.Parser.parse("http://example.com/malformed") + end end -- 2.45.2