changed project/app name

This commit is contained in:
Adam Piontek 2021-02-24 07:49:39 -05:00
parent 4fbafbfa5e
commit cd31432f88
89 changed files with 421 additions and 417 deletions

View file

@ -1,4 +1,4 @@
defmodule RealEstateWeb.ChannelCase do
defmodule Bones73kWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
@ -11,7 +11,7 @@ defmodule RealEstateWeb.ChannelCase do
we enable the SQL sandbox, so changes done to the database
are reverted at the end of every test. If you are using
PostgreSQL, you can even run database tests asynchronously
by setting `use RealEstateWeb.ChannelCase, async: true`, although
by setting `use Bones73kWeb.ChannelCase, async: true`, although
this option is not recommended for other databases.
"""
@ -21,18 +21,18 @@ defmodule RealEstateWeb.ChannelCase do
quote do
# Import conveniences for testing with channels
import Phoenix.ChannelTest
import RealEstateWeb.ChannelCase
import Bones73kWeb.ChannelCase
# The default endpoint for testing
@endpoint RealEstateWeb.Endpoint
@endpoint Bones73kWeb.Endpoint
end
end
setup tags do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(RealEstate.Repo)
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Bones73k.Repo)
unless tags[:async] do
Ecto.Adapters.SQL.Sandbox.mode(RealEstate.Repo, {:shared, self()})
Ecto.Adapters.SQL.Sandbox.mode(Bones73k.Repo, {:shared, self()})
end
:ok

View file

@ -1,4 +1,4 @@
defmodule RealEstateWeb.ConnCase do
defmodule Bones73kWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
@ -11,7 +11,7 @@ defmodule RealEstateWeb.ConnCase do
we enable the SQL sandbox, so changes done to the database
are reverted at the end of every test. If you are using
PostgreSQL, you can even run database tests asynchronously
by setting `use RealEstateWeb.ConnCase, async: true`, although
by setting `use Bones73kWeb.ConnCase, async: true`, although
this option is not recommended for other databases.
"""
@ -22,20 +22,20 @@ defmodule RealEstateWeb.ConnCase do
# Import conveniences for testing with connections
import Plug.Conn
import Phoenix.ConnTest
import RealEstateWeb.ConnCase
import Bones73kWeb.ConnCase
alias RealEstateWeb.Router.Helpers, as: Routes
alias Bones73kWeb.Router.Helpers, as: Routes
# The default endpoint for testing
@endpoint RealEstateWeb.Endpoint
@endpoint Bones73kWeb.Endpoint
end
end
setup tags do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(RealEstate.Repo)
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Bones73k.Repo)
unless tags[:async] do
Ecto.Adapters.SQL.Sandbox.mode(RealEstate.Repo, {:shared, self()})
Ecto.Adapters.SQL.Sandbox.mode(Bones73k.Repo, {:shared, self()})
end
{:ok, conn: Phoenix.ConnTest.build_conn()}
@ -50,7 +50,7 @@ defmodule RealEstateWeb.ConnCase do
test context.
"""
def register_and_log_in_user(%{conn: conn}) do
user = RealEstate.AccountsFixtures.user_fixture()
user = Bones73k.AccountsFixtures.user_fixture()
%{conn: log_in_user(conn, user), user: user}
end
@ -60,7 +60,7 @@ defmodule RealEstateWeb.ConnCase do
It returns an updated `conn`.
"""
def log_in_user(conn, user) do
token = RealEstate.Accounts.generate_user_session_token(user)
token = Bones73k.Accounts.generate_user_session_token(user)
conn
|> Phoenix.ConnTest.init_test_session(%{})

View file

@ -1,4 +1,4 @@
defmodule RealEstate.DataCase do
defmodule Bones73k.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
@ -10,7 +10,7 @@ defmodule RealEstate.DataCase do
we enable the SQL sandbox, so changes done to the database
are reverted at the end of every test. If you are using
PostgreSQL, you can even run database tests asynchronously
by setting `use RealEstate.DataCase, async: true`, although
by setting `use Bones73k.DataCase, async: true`, although
this option is not recommended for other databases.
"""
@ -18,20 +18,20 @@ defmodule RealEstate.DataCase do
using do
quote do
alias RealEstate.Repo
alias Bones73k.Repo
import Ecto
import Ecto.Changeset
import Ecto.Query
import RealEstate.DataCase
import Bones73k.DataCase
end
end
setup tags do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(RealEstate.Repo)
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Bones73k.Repo)
unless tags[:async] do
Ecto.Adapters.SQL.Sandbox.mode(RealEstate.Repo, {:shared, self()})
Ecto.Adapters.SQL.Sandbox.mode(Bones73k.Repo, {:shared, self()})
end
:ok

View file

@ -1,7 +1,7 @@
defmodule RealEstate.AccountsFixtures do
defmodule Bones73k.AccountsFixtures do
@moduledoc """
This module defines test helpers for creating
entities via the `RealEstate.Accounts` context.
entities via the `Bones73k.Accounts` context.
"""
def unique_user_email, do: "user#{System.unique_integer()}@example.com"
@ -14,7 +14,7 @@ defmodule RealEstate.AccountsFixtures do
email: unique_user_email(),
password: valid_user_password()
})
|> RealEstate.Accounts.register_user()
|> Bones73k.Accounts.register_user()
user
end
@ -26,7 +26,7 @@ defmodule RealEstate.AccountsFixtures do
email: unique_user_email(),
password: valid_user_password()
})
|> RealEstate.Accounts.register_admin()
|> Bones73k.Accounts.register_admin()
user
end