diff options
Diffstat (limited to 'test/web/oauth')
| -rw-r--r-- | test/web/oauth/ldap_authorization_test.exs | 6 | ||||
| -rw-r--r-- | test/web/oauth/mfa_controller_test.exs | 4 | ||||
| -rw-r--r-- | test/web/oauth/oauth_controller_test.exs | 16 | 
3 files changed, 13 insertions, 13 deletions
| diff --git a/test/web/oauth/ldap_authorization_test.exs b/test/web/oauth/ldap_authorization_test.exs index a8fe8a841..011642c08 100644 --- a/test/web/oauth/ldap_authorization_test.exs +++ b/test/web/oauth/ldap_authorization_test.exs @@ -19,7 +19,7 @@ defmodule Pleroma.Web.OAuth.LDAPAuthorizationTest do    @tag @skip    test "authorizes the existing user using LDAP credentials" do      password = "testpassword" -    user = insert(:user, password_hash: Comeonin.Pbkdf2.hashpwsalt(password)) +    user = insert(:user, password_hash: Pbkdf2.hash_pwd_salt(password))      app = insert(:oauth_app, scopes: ["read", "write"])      host = Pleroma.Config.get([:ldap, :host]) |> to_charlist @@ -104,7 +104,7 @@ defmodule Pleroma.Web.OAuth.LDAPAuthorizationTest do    @tag @skip    test "falls back to the default authorization when LDAP is unavailable" do      password = "testpassword" -    user = insert(:user, password_hash: Comeonin.Pbkdf2.hashpwsalt(password)) +    user = insert(:user, password_hash: Pbkdf2.hash_pwd_salt(password))      app = insert(:oauth_app, scopes: ["read", "write"])      host = Pleroma.Config.get([:ldap, :host]) |> to_charlist @@ -148,7 +148,7 @@ defmodule Pleroma.Web.OAuth.LDAPAuthorizationTest do    @tag @skip    test "disallow authorization for wrong LDAP credentials" do      password = "testpassword" -    user = insert(:user, password_hash: Comeonin.Pbkdf2.hashpwsalt(password)) +    user = insert(:user, password_hash: Pbkdf2.hash_pwd_salt(password))      app = insert(:oauth_app, scopes: ["read", "write"])      host = Pleroma.Config.get([:ldap, :host]) |> to_charlist diff --git a/test/web/oauth/mfa_controller_test.exs b/test/web/oauth/mfa_controller_test.exs index ce4a07320..3c341facd 100644 --- a/test/web/oauth/mfa_controller_test.exs +++ b/test/web/oauth/mfa_controller_test.exs @@ -20,7 +20,7 @@ defmodule Pleroma.Web.OAuth.MFAControllerTest do        insert(:user,          multi_factor_authentication_settings: %MFA.Settings{            enabled: true, -          backup_codes: [Comeonin.Pbkdf2.hashpwsalt("test-code")], +          backup_codes: [Pbkdf2.hash_pwd_salt("test-code")],            totp: %MFA.Settings.TOTP{secret: otp_secret, confirmed: true}          }        ) @@ -247,7 +247,7 @@ defmodule Pleroma.Web.OAuth.MFAControllerTest do        hashed_codes =          backup_codes -        |> Enum.map(&Comeonin.Pbkdf2.hashpwsalt(&1)) +        |> Enum.map(&Pbkdf2.hash_pwd_salt(&1))        user =          insert(:user, diff --git a/test/web/oauth/oauth_controller_test.exs b/test/web/oauth/oauth_controller_test.exs index 7a107584d..d389e4ce0 100644 --- a/test/web/oauth/oauth_controller_test.exs +++ b/test/web/oauth/oauth_controller_test.exs @@ -311,7 +311,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do             app: app,             conn: conn           } do -      user = insert(:user, password_hash: Comeonin.Pbkdf2.hashpwsalt("testpassword")) +      user = insert(:user, password_hash: Pbkdf2.hash_pwd_salt("testpassword"))        registration = insert(:registration, user: nil)        redirect_uri = OAuthController.default_redirect_uri(app) @@ -342,7 +342,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do             app: app,             conn: conn           } do -      user = insert(:user, password_hash: Comeonin.Pbkdf2.hashpwsalt("testpassword")) +      user = insert(:user, password_hash: Pbkdf2.hash_pwd_salt("testpassword"))        registration = insert(:registration, user: nil)        unlisted_redirect_uri = "http://cross-site-request.com" @@ -750,7 +750,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do      test "issues a token for `password` grant_type with valid credentials, with full permissions by default" do        password = "testpassword" -      user = insert(:user, password_hash: Comeonin.Pbkdf2.hashpwsalt(password)) +      user = insert(:user, password_hash: Pbkdf2.hash_pwd_salt(password))        app = insert(:oauth_app, scopes: ["read", "write"]) @@ -778,7 +778,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do        user =          insert(:user, -          password_hash: Comeonin.Pbkdf2.hashpwsalt(password), +          password_hash: Pbkdf2.hash_pwd_salt(password),            multi_factor_authentication_settings: %MFA.Settings{              enabled: true,              totp: %MFA.Settings.TOTP{secret: otp_secret, confirmed: true} @@ -887,7 +887,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do        password = "testpassword"        {:ok, user} = -        insert(:user, password_hash: Comeonin.Pbkdf2.hashpwsalt(password)) +        insert(:user, password_hash: Pbkdf2.hash_pwd_salt(password))          |> User.confirmation_changeset(need_confirmation: true)          |> User.update_and_set_cache() @@ -915,7 +915,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do        user =          insert(:user, -          password_hash: Comeonin.Pbkdf2.hashpwsalt(password), +          password_hash: Pbkdf2.hash_pwd_salt(password),            deactivated: true          ) @@ -943,7 +943,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do        user =          insert(:user, -          password_hash: Comeonin.Pbkdf2.hashpwsalt(password), +          password_hash: Pbkdf2.hash_pwd_salt(password),            password_reset_pending: true          ) @@ -972,7 +972,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do        user =          insert(:user, -          password_hash: Comeonin.Pbkdf2.hashpwsalt(password), +          password_hash: Pbkdf2.hash_pwd_salt(password),            confirmation_pending: true          ) | 
