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
3121ed13
Commit
3121ed13
authored
Jun 08, 2021
by
feld
Browse files
Blurhash varies slightly by computer generating it, so just validate it wasn't nil
parent
f1abe39f
Pipeline
#36484
passed with stages
in 6 minutes and 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/pleroma/upload/filter/analyze_metadata_test.exs
View file @
3121ed13
...
...
@@ -14,9 +14,10 @@ test "adds the dimensions and blurhash for images" do
tempfile:
Path
.
absname
(
"test/fixtures/image.jpg"
)
}
assert
{
:ok
,
:filtered
,
%{
width:
1024
,
height:
768
,
blurhash:
"V5DI,j_NIS%eI.RDI[RS%1WDr=IVD-RoV{?Ge-tiSKkR"
}}
=
AnalyzeMetadata
.
filter
(
upload
)
{
:ok
,
:filtered
,
meta
}
=
AnalyzeMetadata
.
filter
(
upload
)
assert
%{
width:
1024
,
height:
768
}
=
meta
assert
meta
.
blurhash
end
test
"adds the dimensions for videos"
do
...
...
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