aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-05-28 17:51:50 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-06-11 22:15:53 +0000
commita0c5b42e293959c7bc448f171fc38c2c26f91d18 (patch)
treecf289e7e3664b8901fd97d5283b6d9e3fa81e13f
parentc99b9b9d926b30e417c2a44fa3f0f64029f76b2d (diff)
downloadpleroma-a0c5b42e293959c7bc448f171fc38c2c26f91d18.tar.gz
tests: assert the state prior to mutating it as well as afterward
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs10
1 files changed, 10 insertions, 0 deletions
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)