ash_authentication/test/ash_authentication_test.exs

22 lines
656 B
Elixir
Raw Normal View History

2022-09-28 09:54:05 +13:00
defmodule AshAuthenticationTest do
@moduledoc false
2022-09-28 09:54:05 +13:00
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
2022-09-28 09:54:05 +13:00
end
end