Skip to content

Commit

Permalink
Merge pull request #192 from Team-Blitz-Steady/feat/#181
Browse files Browse the repository at this point in the history
Instancio를 활용한 Fixture 생성
  • Loading branch information
K-jun98 authored Dec 27, 2023
2 parents 290fcfa + 737ec14 commit d94e185
Show file tree
Hide file tree
Showing 7 changed files with 210 additions and 399 deletions.
4 changes: 2 additions & 2 deletions src/main/java/dev/steady/steady/domain/Steady.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ public int getParticipantLimit() {
return participants.getParticipantLimit();
}

public boolean isDeletable(User user) {
validateLeader(user);
public boolean isDeletable(User leader) {
validateLeader(leader);
return numberOfParticipants == 1;
}

Expand Down
10 changes: 0 additions & 10 deletions src/main/java/dev/steady/steady/dto/response/SteadyDto.java

This file was deleted.

4 changes: 2 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ spring:
import: optional:classpath:/sub/

datasource:
url: jdbc:mysql://13.124.69.97:3306/steady
url: jdbc:mysql://localhost:3306/steady
username: steady
password: steady13dev
password: steady13

jpa:
open-in-view: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void createApplicationTest() {
//given
var steady = steadyRepository.save(createSteady(leader, List.of(stack)));
var surveyResultRequests = createSurveyResultRequests();
var otherUser = userRepository.save(createSecondUser(position));
var otherUser = userRepository.save(generateUser(position));
var userInfo = createUserInfo(otherUser.getId());

//when
Expand All @@ -121,9 +121,9 @@ void createApplicationTest() {
@Test
void duplicateApplicationTest() {
//given
var steady = steadyRepository.save(createSteady(leader, stack));
var steady = steadyRepository.save(createSteady(leader, List.of(stack)));
var surveyResultRequests = createSurveyResultRequests();
var otherUser = userRepository.save(createSecondUser(position));
var otherUser = userRepository.save(generateUser(position));
var userInfo = createUserInfo(otherUser.getId());

//when
Expand All @@ -143,7 +143,7 @@ void duplicateApplicationTest() {
@Test
void leaderSubmissionTest() {
//given
var steady = steadyRepository.save(createSteady(leader, stack));
var steady = steadyRepository.save(createSteady(leader, List.of(stack)));
var surveyResultRequests = createSurveyResultRequests();
var userInfo = createUserInfo(leader.getId());

Expand Down
197 changes: 0 additions & 197 deletions src/test/java/dev/steady/steady/fixture/SteadyFixtures.java

This file was deleted.

Loading

0 comments on commit d94e185

Please sign in to comment.