diff options
| author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-05-19 16:11:59 +0400 |
|---|---|---|
| committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-05-19 16:26:06 +0400 |
| commit | 6609714d6694058e28ed789dd65eb50ca816c425 (patch) | |
| tree | 67446272d250798ea6f0560d0491a2c69b09538c /test/web/pleroma_api | |
| parent | 524d04d9218f8e72bf88ab5e7d4b407452ae40bc (diff) | |
| download | pleroma-6609714d6694058e28ed789dd65eb50ca816c425.tar.gz pleroma-6609714d6694058e28ed789dd65eb50ca816c425.zip | |
Move Scrobble views to ScrobbleView
Diffstat (limited to 'test/web/pleroma_api')
| -rw-r--r-- | test/web/pleroma_api/views/scrobble_view_test.exs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/web/pleroma_api/views/scrobble_view_test.exs b/test/web/pleroma_api/views/scrobble_view_test.exs new file mode 100644 index 000000000..6bdb56509 --- /dev/null +++ b/test/web/pleroma_api/views/scrobble_view_test.exs @@ -0,0 +1,20 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + +defmodule Pleroma.Web.PleromaAPI.StatusViewTest do + use Pleroma.DataCase + + alias Pleroma.Web.PleromaAPI.ScrobbleView + + import Pleroma.Factory + + test "successfully renders a Listen activity (pleroma extension)" do + listen_activity = insert(:listen) + + status = ScrobbleView.render("show.json", activity: listen_activity) + + assert status.length == listen_activity.data["object"]["length"] + assert status.title == listen_activity.data["object"]["title"] + end +end |
