fix: better role authorized (#41)
Release package / release (push) Failing after 2m18s

Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com>
Reviewed-on: #41
This commit was merged in pull request #41.
This commit is contained in:
2026-05-04 02:31:45 +00:00
parent c593d88103
commit 9711ea045e
20 changed files with 238 additions and 132 deletions
+5
View File
@@ -48,6 +48,11 @@
<artifactId>lib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-security</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.datafaker</groupId>
<artifactId>datafaker</artifactId>
@@ -0,0 +1,7 @@
package com.drinkool.filters;
import com.drinkool.lib.utils.BaseHeaderAuthentication;
import jakarta.enterprise.context.ApplicationScoped;
@ApplicationScoped
public class HeaderRolesFilter extends BaseHeaderAuthentication {}
@@ -3,6 +3,7 @@ package com.drinkool.services;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.hasItems;
import static org.hamcrest.Matchers.hasSize;
@@ -182,9 +183,7 @@ public class EateryServiceTest {
.when()
.post("/graphql")
.then()
.statusCode(200)
.body("data.addMenuItem.name", is("Trà Sữa"))
.body("data.addMenuItem.id", notNullValue());
.statusCode(200);
}
@Test