forked from AkkomaGang/akkoma
Fix ostatus test.
This commit is contained in:
parent
3c61df6b9e
commit
e002858071
2 changed files with 6 additions and 4 deletions
|
@ -19,7 +19,8 @@ defmodule Pleroma.User.Info do
|
||||||
field(:keys, :string, default: nil)
|
field(:keys, :string, default: nil)
|
||||||
field(:settings, :map, default: nil)
|
field(:settings, :map, default: nil)
|
||||||
field(:magic_key, :string, default: nil)
|
field(:magic_key, :string, default: nil)
|
||||||
# topic, subject, salmon, subscribe_address
|
field(:uri, :string, default: nil)
|
||||||
|
# topic, subject, salmon, subscribe_address, uri
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_activation_status(info, deactivated) do
|
def set_activation_status(info, deactivated) do
|
||||||
|
@ -97,7 +98,8 @@ def remote_user_creation(info, params) do
|
||||||
:source_data,
|
:source_data,
|
||||||
:banner,
|
:banner,
|
||||||
:locked,
|
:locked,
|
||||||
:magic_key
|
:magic_key,
|
||||||
|
:uri
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ test "handle incoming note - GS, Salmon" do
|
||||||
{:ok, [activity]} = OStatus.handle_incoming(incoming)
|
{:ok, [activity]} = OStatus.handle_incoming(incoming)
|
||||||
|
|
||||||
user = User.get_by_ap_id(activity.data["actor"])
|
user = User.get_by_ap_id(activity.data["actor"])
|
||||||
assert user.info["note_count"] == 1
|
assert user.info.note_count == 1
|
||||||
assert activity.data["type"] == "Create"
|
assert activity.data["type"] == "Create"
|
||||||
assert activity.data["object"]["type"] == "Note"
|
assert activity.data["object"]["type"] == "Note"
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ test "tries to use the information in poco fields" do
|
||||||
assert user.name == "Constance Variable"
|
assert user.name == "Constance Variable"
|
||||||
assert user.nickname == "lambadalambda@social.heldscal.la"
|
assert user.nickname == "lambadalambda@social.heldscal.la"
|
||||||
assert user.local == false
|
assert user.local == false
|
||||||
assert user.info["uri"] == uri
|
assert user.info.uri == uri
|
||||||
assert user.ap_id == uri
|
assert user.ap_id == uri
|
||||||
assert user.bio == "Call me Deacon Blues."
|
assert user.bio == "Call me Deacon Blues."
|
||||||
assert user.avatar["type"] == "Image"
|
assert user.avatar["type"] == "Image"
|
||||||
|
|
Loading…
Reference in a new issue