Skip to content

Commit

Permalink
test: Place Test Fixture 작성 #66
Browse files Browse the repository at this point in the history
  • Loading branch information
koomchang committed Nov 7, 2024
1 parent 88979b7 commit d7fa0a1
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions backend/test/place/place.fixture.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Place } from '../../src/place/place.entity';

export class PlaceFixture {
static createPlace = ({
googlePlaceId = 'googlePlaceId_1',
name = 'Central Park',
imageUrl = 'https://example.com/central_park.jpg',
rating = 4.5,
longitude = -73.965355,
latitude = 40.782865,
formattedAddress = 'New York, NY, USA',
description = 'A large public park in New York City.',
url = 'https://example.com/central_park',
}: {
googlePlaceId?: string;
name?: string;
imageUrl?: string;
rating?: number;
longitude?: number;
latitude?: number;
formattedAddress?: string;
description?: string;
url?: string;
}) => {
return new Place(
googlePlaceId,
name,
imageUrl,
rating,
longitude,
latitude,
formattedAddress,
description,
url,
);
};
}

0 comments on commit d7fa0a1

Please sign in to comment.