rename to memex

This commit is contained in:
2022-07-25 19:31:54 -04:00
parent 65ec4286da
commit 1a423f703b
122 changed files with 416 additions and 416 deletions
.drone.yml.gitignoreDockerfile
assets
config
contributing.mddocker-compose.yml
lib
mix.exs
priv
readme.md
test

@ -1,4 +1,4 @@
defmodule LokalWeb.ChannelCase do
defmodule MemexWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
@ -11,7 +11,7 @@ defmodule LokalWeb.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 LokalWeb.ChannelCase, async: true`, although
by setting `use MemexWeb.ChannelCase, async: true`, although
this option is not recommended for other databases.
"""
@ -22,15 +22,15 @@ defmodule LokalWeb.ChannelCase do
quote do
# Import conveniences for testing with channels
import Phoenix.ChannelTest
import LokalWeb.ChannelCase
import MemexWeb.ChannelCase
# The default endpoint for testing
@endpoint LokalWeb.Endpoint
@endpoint MemexWeb.Endpoint
end
end
setup tags do
pid = Sandbox.start_owner!(Lokal.Repo, shared: not tags[:async])
pid = Sandbox.start_owner!(Memex.Repo, shared: not tags[:async])
on_exit(fn -> Sandbox.stop_owner(pid) end)
:ok
end

@ -1,4 +1,4 @@
defmodule LokalWeb.ConnCase do
defmodule MemexWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
@ -11,32 +11,32 @@ defmodule LokalWeb.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 LokalWeb.ConnCase, async: true`, although
by setting `use MemexWeb.ConnCase, async: true`, although
this option is not recommended for other databases.
"""
use ExUnit.CaseTemplate
import Lokal.Fixtures
import Memex.Fixtures
alias Ecto.Adapters.SQL.Sandbox
alias Lokal.{Accounts, Accounts.User, Repo}
alias Memex.{Accounts, Accounts.User, Repo}
using do
quote do
# Import conveniences for testing with connections
import Plug.Conn
import Phoenix.ConnTest
import Lokal.Fixtures
import LokalWeb.ConnCase
import Memex.Fixtures
import MemexWeb.ConnCase
alias LokalWeb.Router.Helpers, as: Routes
alias MemexWeb.Router.Helpers, as: Routes
# The default endpoint for testing
@endpoint LokalWeb.Endpoint
@endpoint MemexWeb.Endpoint
end
end
setup tags do
pid = Sandbox.start_owner!(Lokal.Repo, shared: not tags[:async])
pid = Sandbox.start_owner!(Memex.Repo, shared: not tags[:async])
on_exit(fn -> Sandbox.stop_owner(pid) end)
{:ok, conn: Phoenix.ConnTest.build_conn()}
end
@ -68,7 +68,7 @@ defmodule LokalWeb.ConnCase do
It returns an updated `conn`.
"""
def log_in_user(conn, user) do
token = Lokal.Accounts.generate_user_session_token(user)
token = Memex.Accounts.generate_user_session_token(user)
conn
|> Phoenix.ConnTest.init_test_session(%{})

@ -1,4 +1,4 @@
defmodule Lokal.DataCase do
defmodule Memex.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
@ -10,7 +10,7 @@ defmodule Lokal.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 Lokal.DataCase, async: true`, although
by setting `use Memex.DataCase, async: true`, although
this option is not recommended for other databases.
"""
@ -19,18 +19,18 @@ defmodule Lokal.DataCase do
using do
quote do
alias Lokal.Repo
alias Memex.Repo
import Ecto
import Ecto.Changeset
import Ecto.Query
import Lokal.DataCase
import Lokal.Fixtures
import Memex.DataCase
import Memex.Fixtures
end
end
setup tags do
pid = Sandbox.start_owner!(Lokal.Repo, shared: not tags[:async])
pid = Sandbox.start_owner!(Memex.Repo, shared: not tags[:async])
on_exit(fn -> Sandbox.stop_owner(pid) end)
:ok
end

@ -1,9 +1,9 @@
defmodule Lokal.Fixtures do
defmodule Memex.Fixtures do
@moduledoc """
This module defines test helpers for creating entities
"""
alias Lokal.{Accounts, Accounts.User, Email}
alias Memex.{Accounts, Accounts.User, Email}
def unique_user_email, do: "user#{System.unique_integer()}@example.com"
def valid_user_password, do: "hello world!"