2024-02-07 15:10:13 +00:00
|
|
|
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')
|
2024-02-07 15:10:13 +00:00
|
|
|
})
|
|
|
|
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')
|
2024-02-07 15:10:13 +00:00
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|