From 14ec12ac956ffa9964254cb3be390c9903103da3 Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Mon, 24 Aug 2020 09:47:25 +0300 Subject: added tests --- test/utils_test.exs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/utils_test.exs (limited to 'test/utils_test.exs') 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 +# 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 -- cgit v1.2.3