import { describe, expect, it, vi } from 'vitest';
import { getIamCapabilities } from '@/shared/api/iamCapabilities';
import { apiRequest } from '@/shared/api/httpClient';

vi.mock('@/shared/api/httpClient', () => ({
  apiRequest: vi.fn(),
}));

describe('IAM capabilities API', () => {
  it('loads IAM capabilities', async () => {
    vi.mocked(apiRequest).mockResolvedValueOnce({});

    await getIamCapabilities();

    expect(apiRequest).toHaveBeenCalledWith('/iam/capabilities');
  });
});
