1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-25 01:12:30 +00:00
mobilizon/test/mobilizon_web/resolvers/config_resolver_test.exs

26 lines
650 B
Elixir
Raw Normal View History

2019-03-22 09:53:38 +00:00
defmodule MobilizonWeb.Resolvers.ConfigResolverTest do
alias MobilizonWeb.AbsintheHelpers
use MobilizonWeb.ConnCase
use Bamboo.Test
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"
2019-03-22 09:53:38 +00:00
assert json_response(res, 200)["data"]["config"]["registrationsOpen"] == true
end
end
end