Add follower_address to users, add on generation.
This commit is contained in:
parent
7e9647b146
commit
396c32a6da
4 changed files with 55 additions and 6 deletions
|
|
@ -103,6 +103,7 @@ defmodule Pleroma.UserTest do
|
|||
assert is_binary(changeset.changes[:password_hash])
|
||||
assert changeset.changes[:ap_id] == User.ap_id(%User{nickname: @full_user_data.nickname})
|
||||
assert changeset.changes[:following] == [User.ap_followers(%User{nickname: @full_user_data.nickname})]
|
||||
assert changeset.changes.follower_address == "#{changeset.changes.ap_id}/followers"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -162,6 +163,12 @@ defmodule Pleroma.UserTest do
|
|||
assert cs.valid?
|
||||
end
|
||||
|
||||
test "it sets the follower_adress" do
|
||||
cs = User.remote_user_creation(@valid_remote)
|
||||
# remote users get a fake local follower address
|
||||
assert cs.changes.follower_address == User.ap_followers(%User{ nickname: @valid_remote[:nickname] })
|
||||
end
|
||||
|
||||
test "it enforces the fqn format for nicknames" do
|
||||
cs = User.remote_user_creation(%{@valid_remote | nickname: "bla"})
|
||||
assert cs.changes.local == false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue