diff options
author | rinpatch <rinpatch@sdf.org> | 2019-10-06 15:32:33 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-10-06 15:32:33 +0000 |
commit | b5e6ba323d8a6d6a0440787ee4cdc39c25bdc778 (patch) | |
tree | 95c3bed5f1e09b63caec377d9d3f6cc110bd57f2 /test | |
parent | 8a52f30356a217d657d2569eac5ceab12e3b387d (diff) | |
parent | e442180d111258a0131aaef0e84e621518462455 (diff) | |
download | pleroma-b5e6ba323d8a6d6a0440787ee4cdc39c25bdc778.tar.gz |
Merge branch 'backport/key-moveout-1.1' into 'maint/1.1'
Backport moving out keys from user info to 1.1
See merge request pleroma/pleroma!1801
Diffstat (limited to 'test')
-rw-r--r-- | test/signature_test.exs | 5 | ||||
-rw-r--r-- | test/user_test.exs | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/test/signature_test.exs b/test/signature_test.exs index d5bf63d7d..96c8ba07a 100644 --- a/test/signature_test.exs +++ b/test/signature_test.exs @@ -80,7 +80,7 @@ defmodule Pleroma.SignatureTest do user = insert(:user, %{ ap_id: "https://mastodon.social/users/lambadalambda", - info: %{keys: @private_key} + keys: @private_key }) assert Signature.sign( @@ -94,8 +94,7 @@ defmodule Pleroma.SignatureTest do end test "it returns error" do - user = - insert(:user, %{ap_id: "https://mastodon.social/users/lambadalambda", info: %{keys: ""}}) + user = insert(:user, %{ap_id: "https://mastodon.social/users/lambadalambda", keys: ""}) assert Signature.sign( user, diff --git a/test/user_test.exs b/test/user_test.exs index 74342d700..90c62ba31 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -1408,15 +1408,15 @@ defmodule Pleroma.UserTest do describe "ensure_keys_present" do test "it creates keys for a user and stores them in info" do user = insert(:user) - refute is_binary(user.info.keys) + refute is_binary(user.keys) {:ok, user} = User.ensure_keys_present(user) - assert is_binary(user.info.keys) + assert is_binary(user.keys) end test "it doesn't create keys if there already are some" do - user = insert(:user, %{info: %{keys: "xxx"}}) + user = insert(:user, keys: "xxx") {:ok, user} = User.ensure_keys_present(user) - assert user.info.keys == "xxx" + assert user.keys == "xxx" end end |