"""Tests for RoastBuddy CLI."""

import pytest
from click.testing import CliRunner
from roastbuddy.cli import main


def test_version():
    """Test version command."""
    runner = CliRunner()
    result = runner.invoke(main, ["--version"])
    assert result.exit_code == 0
    assert "0.1.0" in result.output


def test_help():
    """Test help command."""
    runner = CliRunner()
    result = runner.invoke(main, ["--help"])
    assert result.exit_code == 0
    assert "RoastBuddy" in result.output
    assert "witty coding companion" in result.output


def test_commands_exist():
    """Test that all expected commands exist."""
    runner = CliRunner()
    result = runner.invoke(main, ["--help"])
    
    expected_commands = [
        "init", "status", "roast", "praise",
        "streak", "history", "share", "config"
    ]
    
    for cmd in expected_commands:
        assert cmd in result.output
