Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F21968163
utils_test.exs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
932 B
Referenced Files
None
Subscribers
None
utils_test.exs
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.Metadata.UtilsTest
do
use
Pleroma.DataCase
import
Pleroma.Factory
alias
Pleroma.Web.Metadata.Utils
describe
"scrub_html_and_truncate/1"
do
test
"it returns text without encode HTML"
do
user
=
insert
(
:user
)
note
=
insert
(
:note
,
%{
data
:
%{
"actor"
=>
user
.
ap_id
,
"id"
=>
"https://pleroma.gov/objects/whatever"
,
"content"
=>
"Pleroma's really cool!"
}
})
assert
Utils
.
scrub_html_and_truncate
(
note
)
==
"Pleroma's really cool!"
end
end
describe
"scrub_html_and_truncate/2"
do
test
"it returns text without encode HTML"
do
assert
Utils
.
scrub_html_and_truncate
(
"Pleroma's really cool!"
)
==
"Pleroma's really cool!"
end
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 28, 3:24 AM (22 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
799541
Default Alt Text
utils_test.exs (932 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment