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.get_version_from_files(["test/fixtures/warnings/otp_version/22.4"]) ==
17 assert OTPVersion.get_version_from_files(["test/fixtures/warnings/otp_version/22.1"]) ==
22 assert OTPVersion.get_version_from_files(["test/fixtures/warnings/otp_version/21.1"]) ==
27 assert OTPVersion.get_version_from_files(["test/fixtures/warnings/otp_version/23.0"]) ==
31 test "with non existance file" do
32 assert OTPVersion.get_version_from_files([
33 "test/fixtures/warnings/otp_version/non-exising",
34 "test/fixtures/warnings/otp_version/22.4"
39 assert OTPVersion.get_version_from_files([]) == nil