logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

scrobble_view_test.exs (650B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Web.PleromaAPI.ScrobbleViewTest do
  5. use Pleroma.DataCase, async: true
  6. alias Pleroma.Web.PleromaAPI.ScrobbleView
  7. import Pleroma.Factory
  8. test "successfully renders a Listen activity (pleroma extension)" do
  9. listen_activity = insert(:listen)
  10. status = ScrobbleView.render("show.json", activity: listen_activity)
  11. assert status.length == listen_activity.data["object"]["length"]
  12. assert status.title == listen_activity.data["object"]["title"]
  13. end
  14. end