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
bd03644c
Commit
bd03644c
authored
Sep 22, 2018
by
kaniini
Browse files
test: add tests for new User.html_filter_policy()
parent
df00a364
Pipeline
#3819
passed with stages
in 6 minutes and 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/user_test.exs
View file @
bd03644c
...
...
@@ -526,4 +526,18 @@ test "insert or update a user from given data" do
assert
{
:ok
,
%
User
{}}
=
User
.
insert_or_update_user
(
data
)
end
describe
"per-user rich-text filtering"
do
test
"html_filter_policy returns nil when rich-text is enabled"
do
user
=
insert
(
:user
)
assert
nil
==
User
.
html_filter_policy
(
user
)
end
test
"html_filter_policy returns TwitterText scrubber when rich-text is disabled"
do
user
=
insert
(
:user
,
%{
info:
%{
"no_rich_text"
=>
true
}})
assert
Pleroma
.
HTML
.
Scrubber
.
TwitterText
==
User
.
html_filter_policy
(
user
)
end
end
end
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