From 1289b67788c14ec7a6154e181ca6de93c8c2a3a9 Mon Sep 17 00:00:00 2001 From: Federica Agostini Date: Wed, 31 Jul 2024 16:02:21 +0200 Subject: [PATCH] Remove issues --- .../mw/iam/test/oauth/devicecode/DeviceCodeTests.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/iam-login-service/src/test/java/it/infn/mw/iam/test/oauth/devicecode/DeviceCodeTests.java b/iam-login-service/src/test/java/it/infn/mw/iam/test/oauth/devicecode/DeviceCodeTests.java index 3c6cdbd6b..494e6dff5 100644 --- a/iam-login-service/src/test/java/it/infn/mw/iam/test/oauth/devicecode/DeviceCodeTests.java +++ b/iam-login-service/src/test/java/it/infn/mw/iam/test/oauth/devicecode/DeviceCodeTests.java @@ -383,15 +383,10 @@ public void testDeviceCodeApprovalFlowWorks() throws Exception { .getRequest() .getSession(); - String APPROVED_SITE_URL = "http://localhost:8080/" + ApprovedSiteAPI.URL; - - session = (MockHttpSession) mvc.perform(get(APPROVED_SITE_URL).session(session)) + mvc.perform(get("/" + ApprovedSiteAPI.URL).session(session)) .andExpect(status().isOk()) .andExpect(jsonPath("$[0].clientId", equalTo(DEVICE_CODE_CLIENT_ID))) - .andExpect(jsonPath("$[0].userId", equalTo(TEST_USERNAME))) - .andReturn() - .getRequest() - .getSession(); + .andExpect(jsonPath("$[0].userId", equalTo(TEST_USERNAME))); String tokenResponse = mvc