Skip to content

Commit

Permalink
#212 change music folder teardown process
Browse files Browse the repository at this point in the history
  • Loading branch information
kagemomiji committed Aug 8, 2023
1 parent 386346d commit 81fc6c5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public static void init() {
public void setup() {
jdbcTemplate.execute("delete from user_rating");
jdbcTemplate.execute("delete from media_file");
jdbcTemplate.execute("delete from music_folder");

// music folder
MusicFolder musicFolder = new MusicFolder(Paths.get(TEST_FOLDER_PATH), "name", Type.MEDIA, true, Instant.now().truncatedTo(ChronoUnit.MICROS));
Expand Down Expand Up @@ -138,7 +137,8 @@ public void setup() {
public void tearDown() {
jdbcTemplate.execute("delete from user_rating");
jdbcTemplate.execute("delete from media_file");
jdbcTemplate.execute("delete from music_folder");
MusicFolder folder = musicFolderDao.getMusicFolderForPath(TEST_FOLDER_PATH);
musicFolderDao.deleteMusicFolder(folder.getId());
userDao.deleteUser(TEST_USER_NAME);
userDao.deleteUser(TEST_USER_NAME_2);
}
Expand Down

0 comments on commit 81fc6c5

Please sign in to comment.