Sync: code local unifié
Synchronisation du code source local (fait foi). Signed-off-by: lions dev Team
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package dev.lions.unionflow.server.resource;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import io.quarkus.test.security.TestSecurity;
|
||||
import java.util.UUID;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@QuarkusTest
|
||||
class PaiementResourceTest {
|
||||
|
||||
@Test
|
||||
@TestSecurity(user = "admin@unionflow.com", roles = { "ADMIN" })
|
||||
@DisplayName("GET /api/paiements/{id} inexistant retourne 404")
|
||||
void trouverParId_inexistant_returns404() {
|
||||
given()
|
||||
.pathParam("id", UUID.randomUUID())
|
||||
.when()
|
||||
.get("/api/paiements/{id}")
|
||||
.then()
|
||||
.statusCode(404);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestSecurity(user = "admin@unionflow.com", roles = { "ADMIN" })
|
||||
@DisplayName("GET /api/paiements/membre/{id} retourne 200")
|
||||
void listerParMembre_returns200() {
|
||||
given()
|
||||
.pathParam("membreId", UUID.randomUUID())
|
||||
.when()
|
||||
.get("/api/paiements/membre/{membreId}")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body("$", notNullValue());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user