projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Federate follow salmons.
[akkoma]
/
test
/
web
/
ostatus
/
ostatus_test.exs
diff --git
a/test/web/ostatus/ostatus_test.exs
b/test/web/ostatus/ostatus_test.exs
index 1b03c1157e660e30791c0198d140442af2463f82..41e1c3448709ac45ec0fd4a5d2b9fdc8b0db8b13 100644
(file)
--- a/
test/web/ostatus/ostatus_test.exs
+++ b/
test/web/ostatus/ostatus_test.exs
@@
-2,7
+2,7
@@
defmodule Pleroma.Web.OStatusTest do
use Pleroma.DataCase
alias Pleroma.Web.OStatus
alias Pleroma.Web.XML
use Pleroma.DataCase
alias Pleroma.Web.OStatus
alias Pleroma.Web.XML
- alias Pleroma.{Object, Repo}
+ alias Pleroma.{Object, Repo
, User
}
import Pleroma.Factory
test "don't insert create notes twice" do
import Pleroma.Factory
test "don't insert create notes twice" do
@@
-32,6
+32,8
@@
defmodule Pleroma.Web.OStatusTest do
assert activity.data["object"]["type"] == "Note"
assert activity.data["object"]["actor"] == "https://social.heldscal.la/user/23211"
assert activity.data["object"]["content"] == "Will it blend?"
assert activity.data["object"]["type"] == "Note"
assert activity.data["object"]["actor"] == "https://social.heldscal.la/user/23211"
assert activity.data["object"]["content"] == "Will it blend?"
+ user = User.get_cached_by_ap_id(activity.data["actor"])
+ assert User.ap_followers(user) in activity.data["to"]
end
test "handle incoming notes with attachments - GS, subscription" do
end
test "handle incoming notes with attachments - GS, subscription" do
@@
-138,8
+140,14
@@
defmodule Pleroma.Web.OStatusTest do
end
describe "new remote user creation" do
end
describe "new remote user creation" do
+ test "returns local users" do
+ local_user = insert(:user)
+ {:ok, user} = OStatus.find_or_make_user(local_user.ap_id)
+
+ assert user == local_user
+ end
+
test "tries to use the information in poco fields" do
test "tries to use the information in poco fields" do
- # TODO make test local
uri = "https://social.heldscal.la/user/23211"
{:ok, user} = OStatus.find_or_make_user(uri)
uri = "https://social.heldscal.la/user/23211"
{:ok, user} = OStatus.find_or_make_user(uri)
@@
-158,7
+166,6
@@
defmodule Pleroma.Web.OStatusTest do
end
test "find_make_or_update_user takes an author element and returns an updated user" do
end
test "find_make_or_update_user takes an author element and returns an updated user" do
- # TODO make test local
uri = "https://social.heldscal.la/user/23211"
{:ok, user} = OStatus.find_or_make_user(uri)
uri = "https://social.heldscal.la/user/23211"
{:ok, user} = OStatus.find_or_make_user(uri)