Attachment parsing, better magic key fetching.
This commit is contained in:
parent
16afea399d
commit
8141024259
12 changed files with 161 additions and 84 deletions
|
|
@ -15,7 +15,7 @@ defmodule Pleroma.Web.WebFingerTest do
|
|||
test "works for fqns" do
|
||||
user = insert(:user)
|
||||
|
||||
{:ok, result} = WebFinger.webfinger("#{user.nickname}@#{Pleroma.Web.host}")
|
||||
{:ok, result} = WebFinger.webfinger("#{user.nickname}@#{Pleroma.Web.Endpoint.host}")
|
||||
assert is_binary(result)
|
||||
end
|
||||
|
||||
|
|
@ -37,10 +37,10 @@ defmodule Pleroma.Web.WebFingerTest do
|
|||
|
||||
{:ok, data} = WebFinger.finger(user, getter)
|
||||
|
||||
assert data.magic_key == "RSA.wQ3i9UA0qmAxZ0WTIp4a-waZn_17Ez1pEEmqmqoooRsG1_BvpmOvLN0G2tEcWWxl2KOtdQMCiPptmQObeZeuj48mdsDZ4ArQinexY2hCCTcbV8Xpswpkb8K05RcKipdg07pnI7tAgQ0VWSZDImncL6YUGlG5YN8b5TjGOwk2VG8=.AQAB"
|
||||
assert data.topic == "https://social.heldscal.la/api/statuses/user_timeline/29191.atom"
|
||||
assert data.subject == "acct:shp@social.heldscal.la"
|
||||
assert data.salmon == "https://social.heldscal.la/main/salmon/user/29191"
|
||||
assert data["magic_key"] == "RSA.wQ3i9UA0qmAxZ0WTIp4a-waZn_17Ez1pEEmqmqoooRsG1_BvpmOvLN0G2tEcWWxl2KOtdQMCiPptmQObeZeuj48mdsDZ4ArQinexY2hCCTcbV8Xpswpkb8K05RcKipdg07pnI7tAgQ0VWSZDImncL6YUGlG5YN8b5TjGOwk2VG8=.AQAB"
|
||||
assert data["topic"] == "https://social.heldscal.la/api/statuses/user_timeline/29191.atom"
|
||||
assert data["subject"] == "acct:shp@social.heldscal.la"
|
||||
assert data["salmon"] == "https://social.heldscal.la/main/salmon/user/29191"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue