Page MenuHomePhorge

swagger_ui_test.exs
No OneTemporary

Size
404 B
Referenced Files
None
Subscribers
None

swagger_ui_test.exs

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

Mime Type
text/plain
Expires
Fri, Nov 22, 9:04 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38709
Default Alt Text
swagger_ui_test.exs (404 B)

Event Timeline