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
f5ef7fe4
Commit
f5ef7fe4
authored
Jun 07, 2021
by
feld
Browse files
Fix test warnings
parent
b553bfd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/pleroma/web/admin_api/controllers/config_controller_test.exs
View file @
f5ef7fe4
...
...
@@ -1427,30 +1427,27 @@ test "custom instance thumbnail", %{conn: conn} do
]
}
res
=
assert
conn
|>
put_req_header
(
"content-type"
,
"application/json"
)
|>
post
(
"/api/pleroma/admin/config"
,
%{
"configs"
=>
[
params
]})
|>
json_response_and_validate_schema
(
200
)
assert
res
==
%{
"configs"
=>
[
%{
"db"
=>
[
":instance_thumbnail"
],
"group"
=>
":pleroma"
,
"key"
=>
":instance"
,
"value"
=>
params
[
"value"
]
}
],
"need_reboot"
=>
false
}
_res
=
assert
conn
|>
get
(
"/api/v1/instance"
)
|>
json_response_and_validate_schema
(
200
)
assert
conn
|>
put_req_header
(
"content-type"
,
"application/json"
)
|>
post
(
"/api/pleroma/admin/config"
,
%{
"configs"
=>
[
params
]})
|>
json_response_and_validate_schema
(
200
)
==
%{
"configs"
=>
[
%{
"db"
=>
[
":instance_thumbnail"
],
"group"
=>
":pleroma"
,
"key"
=>
":instance"
,
"value"
=>
params
[
"value"
]
}
],
"need_reboot"
=>
false
}
assert
res
=
%{
"thumbnail"
=>
"https://example.com/media/new_thumbnail.jpg"
}
assert
conn
|>
get
(
"/api/v1/instance"
)
|>
json_response_and_validate_schema
(
200
)
|>
Map
.
take
([
"thumbnail"
])
==
%{
"thumbnail"
=>
"https://example.com/media/new_thumbnail.jpg"
}
end
test
"Concurrent Limiter"
,
%{
conn:
conn
}
do
...
...
Write
Preview
Markdown
is supported
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