From d47447afae3fef8456a4d578f99874ccc8676cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 31 Aug 2024 15:29:58 +0200 Subject: [PATCH] fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- test/pleroma/web/common_api_test.exs | 8 ++++---- .../mastodon_api/controllers/timeline_controller_test.exs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs index 4eb2247c89..0f576f7866 100644 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@ -1481,12 +1481,12 @@ test "directly follows back a locked, but followback-allowing local user" do assert {:ok, uselective, uopen, %{data: %{"state" => "accept"}}} = CommonAPI.follow(uopen, uselective) - assert User.get_follow_state(uselective, uopen) == :follow_accept + assert User.get_follow_state(uopen, uselective) == :follow_accept assert {:ok, uopen, uselective, %{data: %{"state" => "accept"}}} = CommonAPI.follow(uselective, uopen) - assert User.get_follow_state(uopen, uselective) == :follow_accept + assert User.get_follow_state(uselective, uopen) == :follow_accept end test "creates a pending request for locked, non-followback local user" do @@ -1496,12 +1496,12 @@ test "creates a pending request for locked, non-followback local user" do assert {:ok, ulocked, uopen, %{data: %{"state" => "accept"}}} = CommonAPI.follow(uopen, ulocked) - assert User.get_follow_state(ulocked, uopen) == :follow_accept + assert User.get_follow_state(uopen, ulocked) == :follow_accept assert {:ok, uopen, ulocked, %{data: %{"state" => "pending"}}} = CommonAPI.follow(ulocked, uopen) - assert User.get_follow_state(uopen, ulocked) == :follow_pending + assert User.get_follow_state(ulocked, uopen) == :follow_pending end end diff --git a/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs index e90a8ab6a1..1e8b63fb59 100644 --- a/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs @@ -1090,9 +1090,9 @@ test "with `%{local: true, federated: false}`, forbids unauthenticated access to end describe "bubble" do - setup do: oauth_access(["read:statuses"]) + test "filtering" do + %{conn: conn, user: user} = oauth_access(["read:statuses"]) - test "filtering", %{conn: conn, user: user} do clear_config([:instance, :local_bubble], []) # our endpoint host has a port in it so let's set the AP ID local_user = insert(:user, %{ap_id: "https://localhost/users/user"})