Fakultas Ilmu Komputer UI

Commit 4c37ecce authored by MUHAMMAD AAQIL ABDULLAH's avatar MUHAMMAD AAQIL ABDULLAH
Browse files

Fix test in ProfileControllerTest

parent fc25873e
......@@ -13,7 +13,7 @@ admin.username = ${ADMIN_USERNAME}
admin.password = ${ADMIN_PASSWORD}
admin.email = ${ADMIN_EMAIL}
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
server.error.whitelabel.enabled=false
......
......@@ -120,6 +120,7 @@ class ProfileControllerTest {
@Test
@WithMockUser(authorities = "ADMIN")
void GetProfileShouldDisplayTheCorrectView() throws Exception {
when(userService.getUserByName(any())).thenReturn(new User());
mockMvc.perform(get("/profile"))
.andExpect(status().isOk())
.andExpect(handler().methodName("profile"))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment