X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Fplugs%2Fset_user_session_id_plug_test.exs;h=9814c80d8bb4f5873f8314cbcf51ab09fc0b6452;hb=4c060ae73371a8567468186e5d1333ec00fbdf41;hp=a50e8010736596c2ece1cfa31a6148d247cca934;hpb=ccc2cf0e87f47618163da588ead76846c64cba7a;p=akkoma
diff --git a/test/pleroma/web/plugs/set_user_session_id_plug_test.exs b/test/pleroma/web/plugs/set_user_session_id_plug_test.exs
index a50e80107..9814c80d8 100644
--- a/test/pleroma/web/plugs/set_user_session_id_plug_test.exs
+++ b/test/pleroma/web/plugs/set_user_session_id_plug_test.exs
@@ -1,10 +1,11 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Plugs.SetUserSessionIdPlugTest do
use Pleroma.Web.ConnCase, async: true
+ alias Pleroma.Helpers.AuthHelper
alias Pleroma.Web.Plugs.SetUserSessionIdPlug
setup %{conn: conn} do
@@ -28,7 +29,7 @@ defmodule Pleroma.Web.Plugs.SetUserSessionIdPlugTest do
assert ret_conn == conn
end
- test "sets :oauth_token in session to :token assign", %{conn: conn} do
+ test "sets session token basing on :token assign", %{conn: conn} do
%{user: user, token: oauth_token} = oauth_access(["read"])
ret_conn =
@@ -37,6 +38,6 @@ defmodule Pleroma.Web.Plugs.SetUserSessionIdPlugTest do
|> assign(:token, oauth_token)
|> SetUserSessionIdPlug.call(%{})
- assert get_session(ret_conn, :oauth_token) == oauth_token.token
+ assert AuthHelper.get_session_token(ret_conn) == oauth_token.token
end
end