/**
 * Tests for SourceBadge component
 */
import { render, screen } from '@testing-library/react';
import { SourceBadge } from '../SourceBadge';

describe('SourceBadge', () => {
  it('renders IGNY8 badge correctly', () => {
    render(<SourceBadge source="igny8" />);
    expect(screen.getByText('IGNY8')).toBeInTheDocument();
  });

  it('renders WordPress badge correctly', () => {
    render(<SourceBadge source="wordpress" />);
    expect(screen.getByText('WordPress')).toBeInTheDocument();
  });

  it('renders Shopify badge correctly', () => {
    render(<SourceBadge source="shopify" />);
    expect(screen.getByText('Shopify')).toBeInTheDocument();
  });

  it('renders Custom badge correctly', () => {
    render(<SourceBadge source="custom" />);
    expect(screen.getByText('Custom')).toBeInTheDocument();
  });

  it('applies custom className', () => {
    const { container } = render(<SourceBadge source="igny8" className="custom-class" />);
    expect(container.firstChild).toHaveClass('custom-class');
  });
});

