tests: assert the state prior to mutating it as well as afterward
This commit is contained in:
parent
c99b9b9d92
commit
a0c5b42e29
|
@ -652,6 +652,11 @@ test "/api/v1/follow_requests works" do
|
||||||
|
|
||||||
{:ok, activity} = ActivityPub.follow(other_user, user)
|
{: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 =
|
conn =
|
||||||
build_conn()
|
build_conn()
|
||||||
|> assign(:user, user)
|
|> assign(:user, user)
|
||||||
|
@ -667,6 +672,11 @@ test "/api/v1/follow_requests/:id/authorize works" do
|
||||||
|
|
||||||
{:ok, activity} = ActivityPub.follow(other_user, user)
|
{: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 =
|
conn =
|
||||||
build_conn()
|
build_conn()
|
||||||
|> assign(:user, user)
|
|> assign(:user, user)
|
||||||
|
|
Loading…
Reference in New Issue