1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-27 10:35:41 +01:00

chase test failures

This commit is contained in:
William Pitcock 2019-05-15 16:23:01 +00:00
parent 12f45e2a89
commit f09c3afdf5
3 changed files with 8 additions and 6 deletions

View File

@ -38,7 +38,8 @@ defmodule Pleroma.Filter do
query =
from(
f in Pleroma.Filter,
where: f.user_id == ^user_id
where: f.user_id == ^user_id,
order_by: [desc: :id]
)
Repo.all(query)

View File

@ -873,7 +873,6 @@ defmodule Pleroma.UserTest do
assert [activity] ==
ActivityPub.fetch_activities([user2.ap_id | user2.following], %{"user" => user2})
|> ActivityPub.contain_timeline(user2)
{:ok, _user} = User.deactivate(user)
@ -882,7 +881,6 @@ defmodule Pleroma.UserTest do
assert [] ==
ActivityPub.fetch_activities([user2.ap_id | user2.following], %{"user" => user2})
|> ActivityPub.contain_timeline(user2)
end
end

View File

@ -960,18 +960,21 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
"in_reply_to_status_id" => private_activity_2.id
})
activities = ActivityPub.fetch_activities([user1.ap_id | user1.following])
activities =
ActivityPub.fetch_activities([user1.ap_id | user1.following])
|> Enum.map(fn a -> a.id end)
private_activity_1 = Activity.get_by_ap_id_with_object(private_activity_1.data["id"])
assert [public_activity, private_activity_1, private_activity_3] == activities
assert [public_activity.id, private_activity_1.id, private_activity_3.id] == activities
assert length(activities) == 3
activities =
ActivityPub.fetch_activities([user1.ap_id | user1.following], %{"user" => user1})
|> Enum.map(fn a -> a.id end)
assert [public_activity, private_activity_1] == activities
assert [public_activity.id, private_activity_1.id] == activities
assert length(activities) == 2
end
end