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 Pleroma.OTPVersionTest do
6 use ExUnit.Case, async: true
8 alias Pleroma.OTPVersion
12 assert OTPVersion.check(["test/fixtures/warnings/otp_version/22.4"]) == :ok
16 assert OTPVersion.check(["test/fixtures/warnings/otp_version/22.1"]) == {:error, "22.1"}
20 assert OTPVersion.check(["test/fixtures/warnings/otp_version/21.1"]) == {:error, "21.1"}
24 assert OTPVersion.check(["test/fixtures/warnings/otp_version/23.0"]) == :ok
27 test "with non existance file" do
28 assert OTPVersion.check([
29 "test/fixtures/warnings/otp_version/non-exising",
30 "test/fixtures/warnings/otp_version/22.4"
35 assert OTPVersion.check([]) == :undefined