summaryrefslogtreecommitdiff
path: root/test/utils_test.exs
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-09-23 11:56:22 -0500
committerMark Felder <feld@FreeBSD.org>2020-09-23 11:56:22 -0500
commitf3a1f9c3bbb7321876a09b3846b5e10ecf4af94f (patch)
treebcfd29188a841470cdeca478b1c5a3bbd4cc930a /test/utils_test.exs
parent34d7e864db8f9cc7fb73ce2fef8466ce8e09ed85 (diff)
parente02101e15c425416975f756aca7f3b058006668d (diff)
downloadpleroma-f3a1f9c3bbb7321876a09b3846b5e10ecf4af94f.tar.gz
pleroma-f3a1f9c3bbb7321876a09b3846b5e10ecf4af94f.zip
Merge branch 'develop' into feature/bulk-confirmation
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..3a730d545
--- /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/\/tmp\/emoji-(.*)-#{:os.getpid()}-(.*)/
+ File.rm_rf(path)
+ end
+ end
+end