fix tags
This commit is contained in:
parent
91236c60c7
commit
d3ec09bb38
2 changed files with 36 additions and 2 deletions
|
|
@ -62,7 +62,12 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
visibility: "public",
|
||||
media_attachments: [],
|
||||
mentions: [],
|
||||
tags: note.data["object"]["tag"],
|
||||
tags: [
|
||||
%{
|
||||
name: "#{note.data["object"]["tag"]}",
|
||||
url: "/tag/#{note.data["object"]["tag"]}"
|
||||
}
|
||||
],
|
||||
application: %{
|
||||
name: "Web",
|
||||
website: nil
|
||||
|
|
@ -151,4 +156,14 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
assert represented[:reblog][:id] == to_string(activity.id)
|
||||
assert represented[:emojis] == []
|
||||
end
|
||||
|
||||
describe "build_tags/1" do
|
||||
test "it returns a a dictionary tags" do
|
||||
assert StatusView.build_tags(["fediverse", "mastodon", "nextcloud"]) == [
|
||||
%{name: "fediverse", url: "/tag/fediverse"},
|
||||
%{name: "mastodon", url: "/tag/mastodon"},
|
||||
%{name: "nextcloud", url: "/tag/nextcloud"}
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue