test: テストを修正

This commit is contained in:
usbharu 2023-12-11 16:19:44 +09:00
parent f5a406d222
commit f7a9dd00e3
1 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,8 @@
package mastodon.timelines
import dev.usbharu.hideout.SpringApplication
import org.flywaydb.core.Flyway
import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
@ -101,4 +103,13 @@ class TimelineApiTest {
.asyncDispatch()
.andExpect { status { isOk() } }
}
companion object {
@JvmStatic
@AfterAll
fun dropDatabase(@Autowired flyway: Flyway) {
flyway.clean()
flyway.migrate()
}
}
}