logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma

scrobble_view_test.exs (635B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Web.PleromaAPI.StatusViewTest do
  5. use Pleroma.DataCase
  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