mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 21:00:16 +02:00
test: add REST API test for get claim status
This commit is contained in:
parent
35be71ed74
commit
533647717a
1 changed files with 12 additions and 0 deletions
|
|
@ -1,14 +1,17 @@
|
|||
package org.gotson.komga.interfaces.api.rest
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.extension.ExtendWith
|
||||
import org.junit.jupiter.params.ParameterizedTest
|
||||
import org.junit.jupiter.params.provider.ValueSource
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
import org.springframework.security.test.context.support.WithAnonymousUser
|
||||
import org.springframework.test.context.ActiveProfiles
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension
|
||||
import org.springframework.test.web.servlet.MockMvc
|
||||
import org.springframework.test.web.servlet.get
|
||||
import org.springframework.test.web.servlet.post
|
||||
|
||||
@ExtendWith(SpringExtension::class)
|
||||
|
|
@ -31,4 +34,13 @@ class ClaimControllerTest(
|
|||
status { isBadRequest() }
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@WithAnonymousUser
|
||||
fun `given anonymous user when getting claim status then returns OK`() {
|
||||
mockMvc.get("/api/v1/claim")
|
||||
.andExpect {
|
||||
status { isOk() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue