Merge branch 'bugfix/visibility-indicator-litepub-dm' into 'develop'
[akkoma] / test / web / rich_media / parser_test.exs
index 93a58c52842e738028b01f7886bf78e4e40addb9..3a9cc1854935c3f375a64f0dc07273538e3fe72b 100644 (file)
@@ -44,6 +44,8 @@ defmodule Pleroma.Web.RichMedia.ParserTest do
               %{
                 image: "http://ia.media-imdb.com/images/rock.jpg",
                 title: "The Rock",
+                description:
+                  "Directed by Michael Bay. With Sean Connery, Nicolas Cage, Ed Harris, John Spencer.",
                 type: "video.movie",
                 url: "http://www.imdb.com/title/tt0117500/"
               }}
@@ -88,4 +90,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