"""Tests for CLI commands."""

from pathlib import Path

from typer.testing import CliRunner

from synth_media_compliance_cli.main import app

runner = CliRunner()


def test_config_init(tmp_path, monkeypatch):
    """Test config initialization."""
    config_path = tmp_path / ".synth-comply.toml"
    monkeypatch.setenv("HOME", str(tmp_path))

    result = runner.invoke(app, ["config", "--init"])

    assert result.exit_code == 0
    assert "Config file created" in result.stdout


def test_process_help():
    """Test process command help."""
    result = runner.invoke(app, ["process", "--help"])
    assert result.exit_code == 0
    assert "Process media files" in result.stdout


def test_verify_help():
    """Test verify command help."""
    result = runner.invoke(app, ["verify", "--help"])
    assert result.exit_code == 0
    assert "Verify watermark" in result.stdout
