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
8df348a3
Commit
8df348a3
authored
Jan 09, 2019
by
lain
Browse files
Add test for summary_html
parent
52493467
Pipeline
#6113
passed with stages
in 5 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/web/twitter_api/representers/activity_representer_test.exs
View file @
8df348a3
...
...
@@ -107,7 +107,7 @@ test "an activity" do
"published"
=>
date
,
"type"
=>
"Note"
,
"content"
=>
content_html
,
"summary"
=>
"2hu"
,
"summary"
=>
"2hu
:2hu:
"
,
"inReplyToStatusId"
=>
213_123
,
"attachment"
=>
[
object
...
...
@@ -129,7 +129,7 @@ test "an activity" do
}
expected_html
=
"<p>2hu</p>alert('YAY')Some <img height=
\"
32px
\"
width=
\"
32px
\"
alt=
\"
2hu
\"
title=
\"
2hu
\"
src=
\"
corndog.png
\"
/> content mentioning <a href=
\"
#{
"<p>2hu
<img height=
\"
32px
\"
width=
\"
32px
\"
alt=
\"
2hu
\"
title=
\"
2hu
\"
src=
\"
corndog.png
\"
/>
</p>alert('YAY')Some <img height=
\"
32px
\"
width=
\"
32px
\"
alt=
\"
2hu
\"
title=
\"
2hu
\"
src=
\"
corndog.png
\"
/> content mentioning <a href=
\"
#{
mentioned_user
.
ap_id
}
\"
>@shp</a>"
...
...
@@ -138,7 +138,7 @@ test "an activity" do
"user"
=>
UserView
.
render
(
"show.json"
,
%{
user:
user
,
for:
follower
}),
"is_local"
=>
false
,
"statusnet_html"
=>
expected_html
,
"text"
=>
"2hu"
<>
content
,
"text"
=>
"2hu
:2hu:
"
<>
content
,
"is_post_verb"
=>
true
,
"created_at"
=>
"Tue May 24 13:26:08 +0000 2016"
,
"in_reply_to_status_id"
=>
213_123
,
...
...
@@ -163,8 +163,9 @@ test "an activity" do
"possibly_sensitive"
=>
true
,
"uri"
=>
activity
.
data
[
"object"
][
"id"
],
"visibility"
=>
"direct"
,
"summary"
=>
"2hu"
,
"summary_html"
=>
"2hu"
"summary"
=>
"2hu :2hu:"
,
"summary_html"
=>
"2hu <img height=
\"
32px
\"
width=
\"
32px
\"
alt=
\"
2hu
\"
title=
\"
2hu
\"
src=
\"
corndog.png
\"
/>"
}
assert
ActivityRepresenter
.
to_map
(
activity
,
%{
...
...
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