1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2025-02-28 03:45:18 +00:00
mobilizon/test/graphql/resolvers/config_test.exs
2020-01-26 21:39:49 +01:00

26 lines
654 B
Elixir

defmodule Mobilizon.GraphQL.Resolvers.ConfigTest do
use Mobilizon.Web.ConnCase
use Bamboo.Test
alias Mobilizon.GraphQL.AbsintheHelpers
describe "Resolver: Get config" do
test "get_config/3 returns the instance config", context do
query = """
{
config {
name,
registrationsOpen
}
}
"""
res =
context.conn
|> get("/api", AbsintheHelpers.query_skeleton(query, "config"))
assert json_response(res, 200)["data"]["config"]["name"] == "Test instance"
assert json_response(res, 200)["data"]["config"]["registrationsOpen"] == true
end
end
end