Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
6556be34
Commit
6556be34
authored
Jan 05, 2019
by
scarlett
Browse files
Resolve some test failures.
parent
3c86d907
Changes
2
Show whitespace changes
Inline
Side-by-side
lib/pleroma/web/twitter_api/representers/activity_representer.ex
View file @
6556be34
...
...
@@ -207,7 +207,7 @@ def to_map(
"activity_type"
=>
"post"
,
"possibly_sensitive"
=>
possibly_sensitive
,
"visibility"
=>
Pleroma
.
Web
.
MastodonAPI
.
StatusView
.
get_visibility
(
object
),
"summary"
=>
object
[
"summary"
]
"summary"
=>
HTML
.
strip_tags
(
object
[
"summary"
]
)
|>
Formatter
.
emojify
(
object
[
"emoji"
])
}
end
...
...
test/web/twitter_api/views/activity_view_test.exs
View file @
6556be34
...
...
@@ -73,6 +73,7 @@ test "a create activity with a note" do
"repeat_num"
=>
0
,
"repeated"
=>
false
,
"statusnet_conversation_id"
=>
convo_id
,
"summary"
=>
""
,
"statusnet_html"
=>
"Hey <span><a data-user=
\"
#{
other_user
.
id
}
\"
href=
\"
#{
other_user
.
ap_id
}
\"
>@<span>shp</span></a></span>!"
,
"tags"
=>
[],
...
...
@@ -80,7 +81,6 @@ test "a create activity with a note" do
"uri"
=>
activity
.
data
[
"object"
][
"id"
],
"user"
=>
UserView
.
render
(
"show.json"
,
%{
user:
user
}),
"visibility"
=>
"direct"
,
"summary"
=>
nil
}
assert
result
==
expected
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment