+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Mix.Tasks.Pleroma.UploadsTest do
alias Pleroma.Upload
use Pleroma.DataCase
assert_received {:mix_shell, :info, [message]}
- assert %{"count" => ^total_count, "total_count" => ^total_count} =
+ # @logevery in Mix.Tasks.Pleroma.Uploads
+ count =
+ min(50, String.to_integer(total_count))
+ |> to_string()
+
+ assert %{"count" => ^count, "total_count" => ^total_count} =
Regex.named_captures(
~r"^Uploaded (?<count>\d+)/(?<total_count>\d+) files$",
message