aboutsummaryrefslogtreecommitdiff
path: root/test/utils_test.exs
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-09-25 10:48:01 -0500
committerMark Felder <feld@FreeBSD.org>2020-09-25 10:48:01 -0500
commit2bf2c68dee1385cba906fe95bd2af3afd2a341b9 (patch)
treed9c1fed6298705d59c5108d52e452922fbdd699b /test/utils_test.exs
parent88653c01c92fffb396e32edad203d18607980c04 (diff)
parent5cd71208d9b273535f978559011377e703e82dcb (diff)
downloadpleroma-2bf2c68dee1385cba906fe95bd2af3afd2a341b9.tar.gz
Merge branch 'develop' into fix/deprecation-warning-welcome-message
Diffstat (limited to 'test/utils_test.exs')
-rw-r--r--test/utils_test.exs15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/utils_test.exs b/test/utils_test.exs
new file mode 100644
index 000000000..460f7e0b5
--- /dev/null
+++ b/test/utils_test.exs
@@ -0,0 +1,15 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.UtilsTest do
+ use ExUnit.Case, async: true
+
+ describe "tmp_dir/1" do
+ test "returns unique temporary directory" do
+ {:ok, path} = Pleroma.Utils.tmp_dir("emoji")
+ assert path =~ ~r/\/emoji-(.*)-#{:os.getpid()}-(.*)/
+ File.rm_rf(path)
+ end
+ end
+end