Skip to content

Commit

Permalink
(PC-34423) refactor(venueMap): use true when isOpenToPublic not defin…
Browse files Browse the repository at this point in the history
…ed for the moment
  • Loading branch information
clesausse-pass committed Feb 11, 2025
1 parent e6108e9 commit f49e791
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export const adaptAlgoliaVenues = (venues: AlgoliaVenue[]): Venue[] =>
venue_type: venue.venue_type,
postalCode: venue.postalCode,
isPermanent: venue.isPermanent === undefined ? true : venue.isPermanent,
isOpenToPublic: venue.isOpenToPublic ?? false,
isOpenToPublic: venue.isOpenToPublic ?? true,
}))
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('fetchVenues', () => {
isPermanent: true,
postalCode: '86280',
venue_type: VenueTypeCodeKey.PERFORMING_ARTS,
isOpenToPublic: false,
isOpenToPublic: true,
}}
${{ hits: [{ ...venueFixture, city: undefined }] }} | ${{
label: '[EAC] Le lieu de Moz’Art 50',
Expand All @@ -97,7 +97,7 @@ describe('fetchVenues', () => {
postalCode: '86280',
isPermanent: true,
venue_type: VenueTypeCodeKey.PERFORMING_ARTS,
isOpenToPublic: false,
isOpenToPublic: true,
}}
`('should fetch venues and format them correctly', async ({ fixture, expectedResult }) => {
search.mockResolvedValueOnce(fixture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const venuesFixture = toMutable([
postalCode: '75000',
isPermanent: true,
venue_type: VenueTypeCodeKey.VISUAL_ARTS,
isOpenToPublic: false,
isOpenToPublic: true,
},
{
label: 'La librairie quantique',
Expand Down

0 comments on commit f49e791

Please sign in to comment.