Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F111994
swagger_ui_test.exs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
404 B
Referenced Files
None
Subscribers
None
swagger_ui_test.exs
View Options
defmodule
OpenApiSpec.Plug.SwaggerUITest
do
use
ExUnit.Case
alias
OpenApiSpex.Plug.SwaggerUI
@opts
SwaggerUI
.
init
(
path
:
"/ui"
)
test
"renders csrf token"
do
token
=
Plug.CSRFProtection
.
get_csrf_token
()
conn
=
Plug.Test
.
conn
(
:get
,
"/ui"
)
conn
=
SwaggerUI
.
call
(
conn
,
@opts
)
assert
conn
.
resp_body
=~
~r[pathname.+?/ui]
assert
String
.
contains?
(
conn
.
resp_body
,
token
)
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 9:04 PM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38709
Default Alt Text
swagger_ui_test.exs (404 B)
Attached To
Mode
R22 open_api_spex
Attached
Detach File
Event Timeline
Log In to Comment