Skip to content

Commit 22d2604

Browse files
author
eugenp
committed
fixes after project move
1 parent 7a54fce commit 22d2604

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
<module>spring-security-client/spring-security-thymeleaf-authorize</module>
159159
<module>spring-security-client/spring-security-thymeleaf-config</module>
160160
<module>spring-security-core</module>
161-
<module>spring-security-custom-permission</module>
161+
<module>spring-security-mvc-boot</module>
162162
<module>spring-security-mvc-custom</module>
163163
<module>spring-security-mvc-digest-auth</module>
164164
<module>spring-security-mvc-ldap</module>

‎spring-security-mvc-boot/src/test/java/org/baeldung/web/LiveTest.java‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@
1414

1515
public class LiveTest {
1616

17-
private final FormAuthConfig formAuthConfig = new FormAuthConfig("http://localhost:8082/spring-security-custom-permission/login", "username", "password");
17+
private final FormAuthConfig formAuthConfig = new FormAuthConfig("http://localhost:8082/spring-security-mvc-boot/login", "username", "password");
1818

1919
@Test
2020
public void givenUserWithReadPrivilegeAndHasPermission_whenGetFooById_thenOK() {
21-
final Response response = givenAuth("john", "123").get("http://localhost:8082/spring-security-custom-permission/foos/1");
21+
final Response response = givenAuth("john", "123").get("http://localhost:8082/spring-security-mvc-boot/foos/1");
2222
assertEquals(200, response.getStatusCode());
2323
assertTrue(response.asString().contains("id"));
2424
}
2525

2626
@Test
2727
public void givenUserWithNoWritePrivilegeAndHasPermission_whenPostFoo_thenForbidden() {
28-
final Response response = givenAuth("john", "123").contentType(MediaType.APPLICATION_JSON_VALUE).body(new Foo("sample")).post("http://localhost:8082/spring-security-custom-permission/foos");
28+
final Response response = givenAuth("john", "123").contentType(MediaType.APPLICATION_JSON_VALUE).body(new Foo("sample")).post("http://localhost:8082/spring-security-mvc-boot/foos");
2929
assertEquals(403, response.getStatusCode());
3030
}
3131

3232
@Test
3333
public void givenUserWithWritePrivilegeAndHasPermission_whenPostFoo_thenOk() {
34-
final Response response = givenAuth("tom", "111").contentType(MediaType.APPLICATION_JSON_VALUE).body(new Foo("sample")).post("http://localhost:8082/spring-security-custom-permission/foos");
34+
final Response response = givenAuth("tom", "111").contentType(MediaType.APPLICATION_JSON_VALUE).body(new Foo("sample")).post("http://localhost:8082/spring-security-mvc-boot/foos");
3535
assertEquals(201, response.getStatusCode());
3636
assertTrue(response.asString().contains("id"));
3737
}
@@ -40,22 +40,22 @@ public void givenUserWithWritePrivilegeAndHasPermission_whenPostFoo_thenOk() {
4040

4141
@Test
4242
public void givenUserMemberInOrganization_whenGetOrganization_thenOK() {
43-
final Response response = givenAuth("john", "123").get("http://localhost:8082/spring-security-custom-permission/organizations/1");
43+
final Response response = givenAuth("john", "123").get("http://localhost:8082/spring-security-mvc-boot/organizations/1");
4444
assertEquals(200, response.getStatusCode());
4545
assertTrue(response.asString().contains("id"));
4646
}
4747

4848
@Test
4949
public void givenUserMemberNotInOrganization_whenGetOrganization_thenForbidden() {
50-
final Response response = givenAuth("john", "123").get("http://localhost:8082/spring-security-custom-permission/organizations/2");
50+
final Response response = givenAuth("john", "123").get("http://localhost:8082/spring-security-mvc-boot/organizations/2");
5151
assertEquals(403, response.getStatusCode());
5252
}
5353

5454
//
5555

5656
@Test
5757
public void givenDisabledSecurityExpression_whenGetFooByName_thenError() {
58-
final Response response = givenAuth("john", "123").get("http://localhost:8082/spring-security-custom-permission/foos?name=sample");
58+
final Response response = givenAuth("john", "123").get("http://localhost:8082/spring-security-mvc-boot/foos?name=sample");
5959
assertEquals(500, response.getStatusCode());
6060
assertTrue(response.asString().contains("method hasAuthority() not allowed"));
6161
}

0 commit comments

Comments
 (0)