"""Tests for Slack MCP channel tools."""

import pytest
from fastmcp import FastMCP
from slack_mcp_server.tools.channels import register_channel_tools


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


class TestChannelTools:
    def test_tools_registered(self, app_with_tools):
        import asyncio
        tools = asyncio.run(app_with_tools.list_tools())
        tool_names = [t.name for t in tools]
        assert "slack_list_channels" in tool_names
        assert "slack_create_channel" in tool_names
        assert "slack_archive_channel" in tool_names
        assert "slack_set_channel_topic" in tool_names
