diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-04-20 10:13:56 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-04-20 10:15:40 -0500 |
commit | bedc558809832ce6ef6063fe91656a0fff0e222c (patch) | |
tree | f844a11ae25f1866bffb79d9eaf0d66aa2babcd6 /test/plugs/authentication_plug_test.exs | |
parent | b54c8813d632cb44c7deb207e91bd32f01f33794 (diff) | |
parent | 28165dad3ac02a6d3ba4b0cda51992a1831515dd (diff) | |
download | pleroma-bedc558809832ce6ef6063fe91656a0fff0e222c.tar.gz |
Merge remote-tracking branch 'upstream/develop' into accept-deletes
Diffstat (limited to 'test/plugs/authentication_plug_test.exs')
-rw-r--r-- | test/plugs/authentication_plug_test.exs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/plugs/authentication_plug_test.exs b/test/plugs/authentication_plug_test.exs index ae2f3f8ec..646bda9d3 100644 --- a/test/plugs/authentication_plug_test.exs +++ b/test/plugs/authentication_plug_test.exs @@ -6,6 +6,8 @@ defmodule Pleroma.Plugs.AuthenticationPlugTest do use Pleroma.Web.ConnCase, async: true alias Pleroma.Plugs.AuthenticationPlug + alias Pleroma.Plugs.OAuthScopesPlug + alias Pleroma.Plugs.PlugHelper alias Pleroma.User import ExUnit.CaptureLog @@ -36,13 +38,16 @@ defmodule Pleroma.Plugs.AuthenticationPlugTest do assert ret_conn == conn end - test "with a correct password in the credentials, it assigns the auth_user", %{conn: conn} do + test "with a correct password in the credentials, " <> + "it assigns the auth_user and marks OAuthScopesPlug as skipped", + %{conn: conn} do conn = conn |> assign(:auth_credentials, %{password: "guy"}) |> AuthenticationPlug.call(%{}) assert conn.assigns.user == conn.assigns.auth_user + assert PlugHelper.plug_skipped?(conn, OAuthScopesPlug) end test "with a wrong password in the credentials, it does nothing", %{conn: conn} do |