Skip to content

Commit

Permalink
Test/fcmschedulertest (#310)
Browse files Browse the repository at this point in the history
* test: fcmScheduler테스트

* test

* test: missionRecordTest코드 Mockbean추가
  • Loading branch information
dbscks97 authored Oct 18, 2024
1 parent 2dac40b commit 3b33a11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ public ResponseEntity<Void> createMissionRecordBoost(
return ResponseEntity.status(HttpStatus.CREATED).build();
}

@PostMapping
@PostMapping("/daily")
public ResponseEntity<Void> dailyTest() {
fcmScheduler.sendDailyNotification();
return ResponseEntity.ok().build();
}

@PostMapping
@PostMapping("/remind")
public ResponseEntity<Void> remindTest() {
fcmScheduler.sendReminderToIncompleteMissions();
return ResponseEntity.ok().build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import com.depromeet.stonebed.domain.missionRecord.application.MissionRecordService;
import com.depromeet.stonebed.domain.missionRecord.dto.request.MissionRecordBoostRequest;
import com.depromeet.stonebed.scheduler.fcm.FcmScheduler;
import com.google.gson.Gson;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -31,6 +32,7 @@ public class MissionRecordControllerTest {
@Autowired private MockMvc mockMvc;

@MockBean private MissionRecordService missionRecordService;
@MockBean private FcmScheduler fcmScheduler;

private final Gson gson = new Gson();

Expand Down

0 comments on commit 3b33a11

Please sign in to comment.