-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46c06af
commit 2e72541
Showing
6 changed files
with
97 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
defmodule PowAssent.Test.Invitation.Phoenix.Endpoint do | ||
@moduledoc false | ||
use Phoenix.Endpoint, otp_app: :pow_assent | ||
|
||
plug Plug.RequestId | ||
plug Plug.Logger | ||
|
||
plug Plug.Parsers, | ||
parsers: [:urlencoded, :multipart, :json], | ||
pass: ["*/*"], | ||
json_decoder: Phoenix.json_library() | ||
|
||
plug Plug.MethodOverride | ||
plug Plug.Head | ||
|
||
plug Plug.Session, | ||
store: :cookie, | ||
key: "_binaryid_key", | ||
signing_salt: "secret" | ||
|
||
plug Pow.Plug.Session, | ||
user: PowAssent.Test.Invitation.Users.User, | ||
routes_backend: PowAssent.Test.Phoenix.Routes, | ||
messages_backend: PowAssent.Test.Phoenix.Messages, | ||
mailer_backend: PowAssent.Test.Phoenix.MailerMock, | ||
repo: PowAssent.Test.Invitation.RepoMock, | ||
otp_app: :pow_assent, | ||
pow_assent: [ | ||
user_identities_context: PowAssent.Test.UserIdentitiesMock | ||
] | ||
|
||
plug PowAssent.Test.Phoenix.Router | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
defmodule PowAssent.Test.Invitation.RepoMock do | ||
@moduledoc false | ||
|
||
alias PowAssent.Test.Invitation.Users.User | ||
|
||
@user %User{id: 1, email: "[email protected]"} | ||
|
||
def get_by(User, [invitation_token: "token"]), do: %{@user | invitation_token: "token"} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters