rename project from SimpleshopTheme to Berrypod
All modules, configs, paths, and references updated. 836 tests pass, zero warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
defmodule SimpleshopThemeWeb.ConnCase do
|
||||
defmodule BerrypodWeb.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 SimpleshopThemeWeb.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 SimpleshopThemeWeb.ConnCase, async: true`, although
|
||||
by setting `use BerrypodWeb.ConnCase, async: true`, although
|
||||
this option is not recommended for other databases.
|
||||
"""
|
||||
|
||||
@@ -20,19 +20,19 @@ defmodule SimpleshopThemeWeb.ConnCase do
|
||||
using do
|
||||
quote do
|
||||
# The default endpoint for testing
|
||||
@endpoint SimpleshopThemeWeb.Endpoint
|
||||
@endpoint BerrypodWeb.Endpoint
|
||||
|
||||
use SimpleshopThemeWeb, :verified_routes
|
||||
use BerrypodWeb, :verified_routes
|
||||
|
||||
# Import conveniences for testing with connections
|
||||
import Plug.Conn
|
||||
import Phoenix.ConnTest
|
||||
import SimpleshopThemeWeb.ConnCase
|
||||
import BerrypodWeb.ConnCase
|
||||
end
|
||||
end
|
||||
|
||||
setup tags do
|
||||
SimpleshopTheme.DataCase.setup_sandbox(tags)
|
||||
Berrypod.DataCase.setup_sandbox(tags)
|
||||
{:ok, conn: Phoenix.ConnTest.build_conn()}
|
||||
end
|
||||
|
||||
@@ -45,8 +45,8 @@ defmodule SimpleshopThemeWeb.ConnCase do
|
||||
test context.
|
||||
"""
|
||||
def register_and_log_in_user(%{conn: conn} = context) do
|
||||
user = SimpleshopTheme.AccountsFixtures.user_fixture()
|
||||
scope = SimpleshopTheme.Accounts.Scope.for_user(user)
|
||||
user = Berrypod.AccountsFixtures.user_fixture()
|
||||
scope = Berrypod.Accounts.Scope.for_user(user)
|
||||
|
||||
opts =
|
||||
context
|
||||
@@ -62,7 +62,7 @@ defmodule SimpleshopThemeWeb.ConnCase do
|
||||
It returns an updated `conn`.
|
||||
"""
|
||||
def log_in_user(conn, user, opts \\ []) do
|
||||
token = SimpleshopTheme.Accounts.generate_user_session_token(user)
|
||||
token = Berrypod.Accounts.generate_user_session_token(user)
|
||||
|
||||
maybe_set_token_authenticated_at(token, opts[:token_authenticated_at])
|
||||
|
||||
@@ -74,6 +74,6 @@ defmodule SimpleshopThemeWeb.ConnCase do
|
||||
defp maybe_set_token_authenticated_at(_token, nil), do: nil
|
||||
|
||||
defp maybe_set_token_authenticated_at(token, authenticated_at) do
|
||||
SimpleshopTheme.AccountsFixtures.override_token_authenticated_at(token, authenticated_at)
|
||||
Berrypod.AccountsFixtures.override_token_authenticated_at(token, authenticated_at)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user