Merge remote-tracking branch 'origin/develop' into global-status-expiration
This commit is contained in:
commit
a7627bdc7a
921 changed files with 19145 additions and 8922 deletions
|
|
@ -29,7 +29,7 @@ defmodule Pleroma.Workers.Cron.DigestEmailsWorkerTest do
|
|||
|
||||
user2 = insert(:user, last_digest_emailed_at: date)
|
||||
{:ok, _} = User.switch_email_notifications(user2, "digest", true)
|
||||
CommonAPI.post(user, %{"status" => "hey @#{user2.nickname}!"})
|
||||
CommonAPI.post(user, %{status: "hey @#{user2.nickname}!"})
|
||||
|
||||
{:ok, user2: user2}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ defmodule Pleroma.Workers.Cron.NewUsersDigestWorkerTest do
|
|||
admin = insert(:user, %{is_admin: true})
|
||||
user = insert(:user, %{inserted_at: yesterday})
|
||||
user2 = insert(:user, %{inserted_at: yesterday})
|
||||
CommonAPI.post(user, %{"status" => "cofe"})
|
||||
CommonAPI.post(user, %{status: "cofe"})
|
||||
|
||||
NewUsersDigestWorker.perform(nil, nil)
|
||||
ObanHelpers.perform_all()
|
||||
|
|
@ -28,6 +28,7 @@ defmodule Pleroma.Workers.Cron.NewUsersDigestWorkerTest do
|
|||
assert email.html_body =~ user.nickname
|
||||
assert email.html_body =~ user2.nickname
|
||||
assert email.html_body =~ "cofe"
|
||||
assert email.html_body =~ "#{Pleroma.Web.Endpoint.url()}/static/logo.png"
|
||||
end
|
||||
|
||||
test "it doesn't fail when admin has no email" do
|
||||
|
|
@ -36,7 +37,7 @@ defmodule Pleroma.Workers.Cron.NewUsersDigestWorkerTest do
|
|||
insert(:user, %{inserted_at: yesterday})
|
||||
user = insert(:user, %{inserted_at: yesterday})
|
||||
|
||||
CommonAPI.post(user, %{"status" => "cofe"})
|
||||
CommonAPI.post(user, %{status: "cofe"})
|
||||
|
||||
NewUsersDigestWorker.perform(nil, nil)
|
||||
ObanHelpers.perform_all()
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ defmodule Pleroma.Workers.Cron.PurgeExpiredActivitiesWorkerTest do
|
|||
|
||||
days = Pleroma.Config.get([:mrf_activity_expiration, :days], 365)
|
||||
|
||||
{:ok, %{id: id} = activity} = Pleroma.Web.CommonAPI.post(user, %{"status" => "cofe"})
|
||||
{:ok, %{id: id} = activity} = Pleroma.Web.CommonAPI.post(user, %{status: "cofe"})
|
||||
|
||||
past_date =
|
||||
NaiveDateTime.utc_now() |> Timex.shift(days: -days) |> NaiveDateTime.truncate(:second)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue