Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F21907909
fallback_test.exs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
fallback_test.exs
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.FallbackTest
do
use
Pleroma.Web.ConnCase
import
Pleroma.Factory
test
"GET /registration/:token"
,
%{
conn
:
conn
}
do
assert
conn
|>
get
(
"/registration/foo"
)
|>
html_response
(
200
)
=~
"<!--server-generated-meta-->"
end
test
"GET /:maybe_nickname_or_id"
,
%{
conn
:
conn
}
do
user
=
insert
(
:user
)
assert
conn
|>
get
(
"/foo"
)
|>
html_response
(
200
)
=~
"<!--server-generated-meta-->"
refute
conn
|>
get
(
"/"
<>
user
.
nickname
)
|>
html_response
(
200
)
=~
"<!--server-generated-meta-->"
end
test
"GET /api*path"
,
%{
conn
:
conn
}
do
assert
conn
|>
get
(
"/api/foo"
)
|>
json_response
(
404
)
==
%{
"error"
=>
"Not implemented"
}
end
test
"GET /pleroma/admin -> /pleroma/admin/"
,
%{
conn
:
conn
}
do
assert
redirected_to
(
get
(
conn
,
"/pleroma/admin"
))
=~
"/pleroma/admin/"
end
test
"GET /*path"
,
%{
conn
:
conn
}
do
assert
conn
|>
get
(
"/foo"
)
|>
html_response
(
200
)
=~
"<!--server-generated-meta-->"
assert
conn
|>
get
(
"/foo/bar"
)
|>
html_response
(
200
)
=~
"<!--server-generated-meta-->"
end
test
"OPTIONS /*path"
,
%{
conn
:
conn
}
do
assert
conn
|>
options
(
"/foo"
)
|>
response
(
204
)
==
""
assert
conn
|>
options
(
"/foo/bar"
)
|>
response
(
204
)
==
""
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 28, 1:42 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
805164
Default Alt Text
fallback_test.exs (1 KB)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment