import { describe, expect, it } from 'vitest'
import { formatPriceRub } from '../format-price'

describe('formatPriceRub', () => {
  it('formats cents to rubles', () => {
    const result = formatPriceRub(10000)
    expect(result).toContain('100')
    expect(result).toContain('₽')
  })

  it('formats zero', () => {
    const result = formatPriceRub(0)
    expect(result).toContain('0')
    expect(result).toContain('₽')
  })

  it('rounds to integer rubles', () => {
    const result = formatPriceRub(10050)
    expect(result).toContain('101')
    expect(result).toContain('₽')
  })
})
