From bf2b4a2f3cf6c3638ea201f4207b8b07e01d663d 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 edef5ceac..5dd5af568 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