Merge branch 'develop' into refactor/notification_settings
[akkoma] / test / web / preload / timeline_test.exs
index 00b10d0abbab3f10db5815d00ef518a774f08a9f..fea95a6a465b44e4931dce899dde8a2a560e68d8 100644 (file)
@@ -9,7 +9,7 @@ defmodule Pleroma.Web.Preload.Providers.TimelineTest do
   alias Pleroma.Web.CommonAPI
   alias Pleroma.Web.Preload.Providers.Timelines
 
-  @public_url :"/api/v1/timelines/public"
+  @public_url "/api/v1/timelines/public"
 
   describe "unauthenticated timeliness when restricted" do
     setup do
@@ -52,9 +52,9 @@ defmodule Pleroma.Web.Preload.Providers.TimelineTest do
     end
 
     test "returns public items", %{user: user} do
-      {:ok, _} = CommonAPI.post(user, %{"status" => "it's post 1!"})
-      {:ok, _} = CommonAPI.post(user, %{"status" => "it's post 2!"})
-      {:ok, _} = CommonAPI.post(user, %{"status" => "it's post 3!"})
+      {:ok, _} = CommonAPI.post(user, %{status: "it's post 1!"})
+      {:ok, _} = CommonAPI.post(user, %{status: "it's post 2!"})
+      {:ok, _} = CommonAPI.post(user, %{status: "it's post 3!"})
 
       assert Timelines.generate_terms(%{})
              |> Map.fetch!(@public_url)
@@ -62,9 +62,9 @@ defmodule Pleroma.Web.Preload.Providers.TimelineTest do
     end
 
     test "does not return non-public items", %{user: user} do
-      {:ok, _} = CommonAPI.post(user, %{"status" => "it's post 1!", "visibility" => "unlisted"})
-      {:ok, _} = CommonAPI.post(user, %{"status" => "it's post 2!", "visibility" => "direct"})
-      {:ok, _} = CommonAPI.post(user, %{"status" => "it's post 3!"})
+      {:ok, _} = CommonAPI.post(user, %{status: "it's post 1!", visibility: "unlisted"})
+      {:ok, _} = CommonAPI.post(user, %{status: "it's post 2!", visibility: "direct"})
+      {:ok, _} = CommonAPI.post(user, %{status: "it's post 3!"})
 
       assert Timelines.generate_terms(%{})
              |> Map.fetch!(@public_url)