logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma

utils_test.exs (448B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.UtilsTest do
  5. use ExUnit.Case, async: true
  6. describe "tmp_dir/1" do
  7. test "returns unique temporary directory" do
  8. {:ok, path} = Pleroma.Utils.tmp_dir("emoji")
  9. assert path =~ ~r/\/emoji-(.*)-#{:os.getpid()}-(.*)/
  10. File.rm_rf(path)
  11. end
  12. end
  13. end