Make sure title is properly sanitized
Close #247 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
defmodule MobilizonWeb.AbsintheHelpers do
|
||||
use Phoenix.ConnTest
|
||||
@endpoint MobilizonWeb.Endpoint
|
||||
|
||||
@moduledoc """
|
||||
Absinthe helpers for tests
|
||||
"""
|
||||
@@ -17,4 +20,20 @@ defmodule MobilizonWeb.AbsintheHelpers do
|
||||
"variables" => ""
|
||||
}
|
||||
end
|
||||
|
||||
def graphql_query(conn, options) do
|
||||
conn
|
||||
|> post(
|
||||
"/api",
|
||||
build_query(options[:query], options[:variables])
|
||||
)
|
||||
|> json_response(200)
|
||||
end
|
||||
|
||||
defp build_query(query, variables) do
|
||||
%{
|
||||
"query" => query,
|
||||
"variables" => variables
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user