Skip to content

Commit

Permalink
test: event save 로직 분리
Browse files Browse the repository at this point in the history
Arachneee committed Jul 20, 2024
1 parent ef63c60 commit fd926b6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -32,7 +32,8 @@ class BillActionServiceTest {
@Test
void saveAllBillAction() {
String token = "TOKEN";
Event event = eventRepository.save(new Event("감자", token));
Event event = new Event("감자", token);
Event savedEvent = eventRepository.save(event);

List<BillActionAppRequest> requests = List.of(
new BillActionAppRequest("뽕족", 10_000L),
@@ -41,7 +42,7 @@ void saveAllBillAction() {

billActionService.saveAllBillAction(token, requests);

List<BillAction> actions = billActionRepository.findByAction_Event(event)
List<BillAction> actions = billActionRepository.findByAction_Event(savedEvent)
.stream()
.sorted(Comparator.comparing(BillAction::getSequence).reversed())
.limit(requests.size())

0 comments on commit fd926b6

Please sign in to comment.