Skip to content
Snippets Groups Projects
Commit 92230383 authored by eal's avatar eal
Browse files

Fix some more tests.

parent 79b3397c
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
test "contains mentions" do
incoming = File.read!("test/fixtures/incoming_reply_mastodon.xml")
user = insert(:user, %{ap_id: "https://pleroma.soykaf.com/users/lain"})
# a user with this ap id might be in the cache.
recipient = "https://pleroma.soykaf.com/users/lain"
user = User.get_cached_by_ap_id(recipient) || insert(:user, %{ap_id: recipient})
{:ok, [activity]} = OStatus.handle_incoming(incoming)
......
......@@ -30,8 +30,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
User.follow(follower, user)
User.follow(second_follower, user)
User.follow(user, follower)
user = Repo.get!(User, user.id)
{:ok, user} = User.update_follower_count(user)
Cachex.set(:user_cache, "user_info:#{user.id}", User.user_info(Repo.get!(User, user.id)))
image = "https://placehold.it/48x48"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment