diff --git a/config/test.exs b/config/test.exs index a339a45..0afccea 100644 --- a/config/test.exs +++ b/config/test.exs @@ -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 diff --git a/test/support/test_endpoints.ex b/test/support/test_endpoints.ex new file mode 100644 index 0000000..882e719 --- /dev/null +++ b/test/support/test_endpoints.ex @@ -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