Update the test configuration to allow run server during tests.

dev
KKlochko 3 months ago
parent 85993dbe9a
commit 52ff683c2d

@ -20,7 +20,7 @@ config :decentralised_book_index, DecentralisedBookIndex.Repo,
config :decentralised_book_index, DecentralisedBookIndexWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: "6NMai4xOf+JhqltU9Ecf+U+DcyMSKs7SYtUc1Kf06H8UrG+MmJu3nXHS4CosOOdN",
server: false
server: true
# In test we don't send emails
config :decentralised_book_index, DecentralisedBookIndex.Mailer, adapter: Swoosh.Adapters.Test

@ -0,0 +1,12 @@
defmodule DecentralisedBookIndex.TestEndpoints do
@moduledoc "Test API endpoint for tests"
@test_api_endpoint "http://localhost:4002"
@doc """
Returns the url of test API endpoint.
"""
def test_api_endpoint(_opts \\ []) do
@test_api_endpoint
end
end
Loading…
Cancel
Save