import { describe, expect, it } from 'vitest'
import { ClickUpAdapter } from './clickup-adapter'

describe('ClickUpAdapter', () => {
  const adapter = new ClickUpAdapter()

  it('accepts ClickUp personal tokens stored in provider-specific apiToken shape', () => {
    expect(adapter.validateCredentials({ apiToken: 'pk_test_123' })).toBe(true)
  })

  it('accepts ClickUp personal tokens stored in generic api-key shape', () => {
    expect(adapter.validateCredentials({ apiKey: 'pk_test_123' })).toBe(true)
  })

  it('rejects non-ClickUp API keys', () => {
    expect(adapter.validateCredentials({ apiKey: 'sk_test_123' })).toBe(false)
  })
})
