"""Tests for Slack MCP messaging tools."""

import pytest
from unittest.mock import AsyncMock, patch
from fastmcp import FastMCP
from slack_mcp_server.tools.messaging import register_messaging_tools


@pytest.fixture
def app_with_tools(mock_config):
    app = FastMCP(name="test", version="0.1.0")
    register_messaging_tools(app, mock_config)
    return app


class TestMessagingTools:
    def test_tools_registered(self, app_with_tools):
        """Verify all messaging tools are registered."""
        import asyncio
        tools = asyncio.run(app_with_tools.list_tools())
        tool_names = [t.name for t in tools]
        assert "slack_send_message" in tool_names
        assert "slack_read_messages" in tool_names
        assert "slack_reply_thread" in tool_names
        assert "slack_send_dm" in tool_names
