mon-entreprise/site/test/fabrique-social.test.ts

22 lines
686 B
TypeScript
Raw Normal View History

import { describe, expect, it } from 'vitest'
import { getSiegeOrFirstEtablissement } from '@/api/fabrique-social'
import {
fabriqueSocialWithoutSiege,
fabriqueSocialWithSiege,
} from './fabrique-social.fixtures'
describe('Fabrique Social', () => {
describe('getSiegeOrFirstEtablissement Function', () => {
it('should return siege', () => {
const siege = getSiegeOrFirstEtablissement(fabriqueSocialWithSiege)
2024-02-23 10:31:44 +00:00
expect(siege.address).toBe('23 RUE DE MOGADOR 75009 PARIS 9')
})
it('should return FirstEtablissement', () => {
const siege = getSiegeOrFirstEtablissement(fabriqueSocialWithoutSiege)
2024-02-23 10:31:44 +00:00
expect(siege.address).toBe('4 RUE VOLTAIRE 44000 NANTES')
})
})
})