Update the test configuration to allow run server during tests.
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ config :decentralised_book_index, DecentralisedBookIndex.Repo,
|
|||||||
config :decentralised_book_index, DecentralisedBookIndexWeb.Endpoint,
|
config :decentralised_book_index, DecentralisedBookIndexWeb.Endpoint,
|
||||||
http: [ip: {127, 0, 0, 1}, port: 4002],
|
http: [ip: {127, 0, 0, 1}, port: 4002],
|
||||||
secret_key_base: "6NMai4xOf+JhqltU9Ecf+U+DcyMSKs7SYtUc1Kf06H8UrG+MmJu3nXHS4CosOOdN",
|
secret_key_base: "6NMai4xOf+JhqltU9Ecf+U+DcyMSKs7SYtUc1Kf06H8UrG+MmJu3nXHS4CosOOdN",
|
||||||
server: false
|
server: true
|
||||||
|
|
||||||
# In test we don't send emails
|
# In test we don't send emails
|
||||||
config :decentralised_book_index, DecentralisedBookIndex.Mailer, adapter: Swoosh.Adapters.Test
|
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
|
||||||
Reference in New Issue
Block a user