Skip to content

Commit

Permalink
Test: add delete experience by user
Browse files Browse the repository at this point in the history
  • Loading branch information
emost22 committed Jun 20, 2024
1 parent b0ae24f commit fe4717b
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,19 @@ class ExperienceRepositoryTest implements ExperienceTest {
assertThat(experienceEntity.getLink()).isEqualTo(savedExperience.getLink());
assertThat(experienceEntity.getUserEntity()).isEqualTo(savedExperience.getUserEntity());
}

@Test
void 경험_삭제_user_테스트() {
// given
userRepository.save(TEST_USER);
experienceRepository.save(TEST_EXPERIENCE);
experienceRepository.deleteByUserEntity(TEST_USER);

// when
ExperienceEntity experienceEntity =
experienceRepository.findTopByUserEntityOrderByCreateTimestampDesc(TEST_USER);

// then
assertThat(experienceEntity).isNull();
}
}

0 comments on commit fe4717b

Please sign in to comment.