mirror of
https://github.com/team-alembic/ash_authentication.git
synced 2024-09-21 05:43:05 +12:00
bab9ec363e
* fix(PasswordReset): Generate the reset token using the target action, not the source action. Also improve tests. * improvement(PasswordReset): rework PasswordReset to be a provider in it's own right - this means it has it's own routes, etc.
21 lines
656 B
Elixir
21 lines
656 B
Elixir
defmodule AshAuthenticationTest do
|
|
@moduledoc false
|
|
use ExUnit.Case
|
|
doctest AshAuthentication
|
|
|
|
describe "authenticated_resources/0" do
|
|
test "it correctly locates all authenticatable resources" do
|
|
assert [
|
|
%{
|
|
api: Example,
|
|
providers: providers,
|
|
resource: Example.UserWithUsername,
|
|
subject_name: :user_with_username
|
|
}
|
|
] = AshAuthentication.authenticated_resources(:ash_authentication)
|
|
|
|
assert AshAuthentication.PasswordAuthentication in providers
|
|
assert AshAuthentication.PasswordReset in providers
|
|
end
|
|
end
|
|
end
|