diff options
| author | lain <lain@soykaf.club> | 2020-05-20 14:02:40 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-05-20 14:02:40 +0200 |
| commit | c7cdc553ff9bd7a068274d9b4b71008d9df04723 (patch) | |
| tree | 7b66d6b01ea9d0e82ec2b594e4549397230ce145 /test/web/pleroma_api/views | |
| parent | 0d5bce018df9c99c771daaaa1de3ab0efc0cba5c (diff) | |
| parent | 423ea497bb2a7225f4f0d0e1ebff93466b3ec124 (diff) | |
| download | pleroma-c7cdc553ff9bd7a068274d9b4b71008d9df04723.tar.gz pleroma-c7cdc553ff9bd7a068274d9b4b71008d9df04723.zip | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into announce-validator
Diffstat (limited to 'test/web/pleroma_api/views')
| -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 |
