Skip to content

Commit 5a798e9

Browse files
committed
Polish MVC Tests
Issue gh-14418
1 parent aa88404 commit 5a798e9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

config/src/test/java/org/springframework/security/config/annotation/web/configurers/AuthorizeRequestsTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -76,7 +76,7 @@ public class AuthorizeRequestsTests {
7676
@BeforeEach
7777
public void setup() {
7878
this.servletContext = spy(MockServletContext.mvc());
79-
this.request = new MockHttpServletRequest("GET", "");
79+
this.request = new MockHttpServletRequest(this.servletContext, "GET", "");
8080
this.request.setMethod("GET");
8181
this.response = new MockHttpServletResponse();
8282
this.chain = new MockFilterChain();

config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpSecuritySecurityMatchersTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -75,7 +75,7 @@ public class HttpSecuritySecurityMatchersTests {
7575

7676
@BeforeEach
7777
public void setup() throws Exception {
78-
this.request = new MockHttpServletRequest("GET", "");
78+
this.request = new MockHttpServletRequest(MockServletContext.mvc(), "GET", "");
7979
this.request.setMethod("GET");
8080
this.response = new MockHttpServletResponse();
8181
this.chain = new MockFilterChain();

config/src/test/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationConfigurerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -72,7 +72,7 @@ public class UrlAuthorizationConfigurerTests {
7272

7373
@BeforeEach
7474
public void setup() {
75-
this.request = new MockHttpServletRequest("GET", "");
75+
this.request = new MockHttpServletRequest(MockServletContext.mvc(), "GET", "");
7676
this.request.setMethod("GET");
7777
this.response = new MockHttpServletResponse();
7878
this.chain = new MockFilterChain();

0 commit comments

Comments
 (0)