"""Contains all unit tests for the main CLI."""

from unittest.mock import MagicMock, patch

from typer.testing import CliRunner

from voraus_pipeline_utils.cli.main import app


@patch("voraus_pipeline_utils.cli.main.get_app_version")
def test_main_app(get_app_version_mock: MagicMock, cli_runner: CliRunner) -> None:
    get_app_version_mock.return_value = 42
    result = cli_runner.invoke(app, ["--version"])
    assert result.stdout == "42\n"
