Revert "oauth2 fixes (#177)"
[akkoma] / test / pleroma / web / plugs / o_auth_plug_test.exs
index ad2aa5d1b098fed9473334b8feced2ddee887b42..9e4be555900f89183b18a03f16d3c71cf1768b03 100644 (file)
@@ -1,10 +1,11 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.Plugs.OAuthPlugTest do
   use Pleroma.Web.ConnCase, async: true
 
+  alias Pleroma.Helpers.AuthHelper
   alias Pleroma.Web.OAuth.Token
   alias Pleroma.Web.OAuth.Token.Strategy.Revoke
   alias Pleroma.Web.Plugs.OAuthPlug
@@ -84,7 +85,7 @@ defmodule Pleroma.Web.Plugs.OAuthPlugTest do
         conn
         |> Session.call(Session.init(session_opts))
         |> fetch_session()
-        |> put_session(:oauth_token, oauth_token.token)
+        |> AuthHelper.put_session_token(oauth_token.token)
 
       %{conn: conn}
     end