-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 온보딩이 필수이기 때문에 온보딩을 하지않으면 접근권한 없음 - 다음 번들 찾는 로직을 진행하지않은 번들중에서 찾도록 변경
- Loading branch information
1 parent
d9b9d3d
commit 6371c1a
Showing
7 changed files
with
49 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...c/main/java/org/nexters/jaknaesocore/domain/survey/repository/SurveyBundleRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
package org.nexters.jaknaesocore.domain.survey.repository; | ||
|
||
import java.util.Collection; | ||
import java.util.Optional; | ||
import org.nexters.jaknaesocore.domain.survey.model.SurveyBundle; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface SurveyBundleRepository extends JpaRepository<SurveyBundle, Long> { | ||
|
||
Optional<SurveyBundle> findFirstByIdGreaterThanOrderByIdAsc(final Long id); | ||
Optional<SurveyBundle> findFirstByIdNotInOrderByIdAsc(Collection<Long> ids); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,7 +182,7 @@ void throwSurveyNotFoundException() { | |
} | ||
|
||
@Test | ||
void 설문_기록이_없으면_1번_번들을_제공한다() { | ||
void 설문_기록이_없으면_접근_할_수_없() { | ||
// given | ||
Member member = Member.create("나민혁", "[email protected]"); | ||
memberRepository.save(member); | ||
|
@@ -212,12 +212,10 @@ void throwSurveyNotFoundException() { | |
SurveyOption.builder().survey(survey4).scores(scores).content("4점").build(); | ||
surveyOptionRepository.saveAll(List.of(option1, option2, option3, option4, option5, option6)); | ||
// when | ||
SurveyHistoryResponse response = surveyService.getSurveyHistory(member.getId()); | ||
|
||
// then | ||
then(response) | ||
.extracting("bundleId", "nextSurveyIndex", "surveyHistoryDetails") | ||
.containsExactly(1L, 1, List.of()); | ||
thenThrownBy(() -> surveyService.getSurveyHistory(member.getId())) | ||
.isInstanceOf(CustomException.class) | ||
.isEqualTo(CustomException.NOT_PROCEED_ONBOARDING); | ||
} | ||
|
||
@Test | ||
|