summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2018-12-14 22:56:37 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2018-12-14 23:16:12 +0300
commitea72ac549b2ac52623462d6862154fb6f800c01c (patch)
treec6c1cfc6cc6e478311b480c2408e92494702caba /test
parentd3ec09bb380bb990bea6edc5dae6bbda7f2322c5 (diff)
downloadpleroma-ea72ac549b2ac52623462d6862154fb6f800c01c.tar.gz
pleroma-ea72ac549b2ac52623462d6862154fb6f800c01c.zip
fix case when tags is invalid
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/status_view_test.exs13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs
index 4f9805c78..b7ac92760 100644
--- a/test/web/mastodon_api/status_view_test.exs
+++ b/test/web/mastodon_api/status_view_test.exs
@@ -159,7 +159,18 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
describe "build_tags/1" do
test "it returns a a dictionary tags" do
- assert StatusView.build_tags(["fediverse", "mastodon", "nextcloud"]) == [
+ object_tags = [
+ "fediverse",
+ "mastodon",
+ "nextcloud",
+ %{
+ "href" => "https://kawen.space/users/lain",
+ "name" => "@lain@kawen.space",
+ "type" => "Mention"
+ }
+ ]
+
+ assert StatusView.build_tags(object_tags) == [
%{name: "fediverse", url: "/tag/fediverse"},
%{name: "mastodon", url: "/tag/mastodon"},
%{name: "nextcloud", url: "/tag/nextcloud"}