mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-24 08:54:08 +00:00
25 lines
650 B
Elixir
25 lines
650 B
Elixir
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"
|
|
assert json_response(res, 200)["data"]["config"]["registrationsOpen"] == true
|
|
end
|
|
end
|
|
end
|