1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.Metadata.PlayerViewTest do
6 use Pleroma.DataCase, async: true
8 alias Pleroma.Web.Metadata.PlayerView
10 test "it renders audio tag" do
14 %{"mediaType" => "audio", "href" => "test-href"}
16 |> Phoenix.HTML.safe_to_string()
19 "<audio controls><source src=\"test-href\" type=\"audio\">Your browser does not support audio playback.</audio>"
22 test "it renders videos tag" do
26 %{"mediaType" => "video", "href" => "test-href"}
28 |> Phoenix.HTML.safe_to_string()
31 "<video controls loop><source src=\"test-href\" type=\"video\">Your browser does not support video playback.</video>"