From: William Pitcock Date: Mon, 28 May 2018 17:51:50 +0000 (+0000) Subject: tests: assert the state prior to mutating it as well as afterward X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=a0c5b42e293959c7bc448f171fc38c2c26f91d18;p=akkoma tests: assert the state prior to mutating it as well as afterward --- diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index e45b5c9c2..d1812457d 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -652,6 +652,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do {:ok, activity} = ActivityPub.follow(other_user, user) + user = Repo.get(User, user.id) + other_user = Repo.get(User, other_user.id) + + assert User.following?(other_user, user) == false + conn = build_conn() |> assign(:user, user) @@ -667,6 +672,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do {:ok, activity} = ActivityPub.follow(other_user, user) + user = Repo.get(User, user.id) + other_user = Repo.get(User, other_user.id) + + assert User.following?(other_user, user) == false + conn = build_conn() |> assign(:user, user)