X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fplugs%2Fauthentication_plug_test.exs;h=ae2f3f8ec38147dfc63b782ff364db2467ec2729;hb=9cf4c4fa73e68f03791c5cc70505b710be39b677;hp=7ca04561638e7f1b9dc3e6802dac179e9910ae47;hpb=6e99e7c774d5e8b6e881810c506cfd9dce2a6107;p=akkoma diff --git a/test/plugs/authentication_plug_test.exs b/test/plugs/authentication_plug_test.exs index 7ca045616..ae2f3f8ec 100644 --- a/test/plugs/authentication_plug_test.exs +++ b/test/plugs/authentication_plug_test.exs @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2018 Pleroma Authors +# Copyright © 2017-2020 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Plugs.AuthenticationPlugTest do @@ -9,7 +9,6 @@ defmodule Pleroma.Plugs.AuthenticationPlugTest do alias Pleroma.User import ExUnit.CaptureLog - import Mock setup %{conn: conn} do user = %User{ @@ -67,13 +66,12 @@ defmodule Pleroma.Plugs.AuthenticationPlugTest do refute AuthenticationPlug.checkpw("test-password1", hash) end + @tag :skip_on_mac test "check sha512-crypt hash" do hash = "$6$9psBWV8gxkGOZWBz$PmfCycChoxeJ3GgGzwvhlgacb9mUoZ.KUXNCssekER4SJ7bOK53uXrHNb2e4i8yPFgSKyzaW9CcmrDXWIEMtD1" - with_mock :crypt, crypt: fn _password, password_hash -> password_hash end do - assert AuthenticationPlug.checkpw("password", hash) - end + assert AuthenticationPlug.checkpw("password", hash) end test "it returns false when hash invalid" do