1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Mix.Tasks.Pleroma.ReleaseEnvTest do
7 import ExUnit.CaptureIO, only: [capture_io: 1]
9 @path "config/pleroma.test.env"
12 if File.exists?(@path) do
19 on_exit(fn -> do_clean() end)
23 test "generate pleroma.env" do
24 assert capture_io(fn ->
25 Mix.Tasks.Pleroma.ReleaseEnv.run(["gen", "--path", @path, "--force"])
26 end) =~ "The file generated"
28 assert File.read!(@path) =~ "RELEASE_COOKIE="