@@ -31,22 +31,23 @@ public class AuthenticationRestLiveTest {
3131
3232 @ Autowired
3333 private SecBusinessPaths paths ;
34+
3435 @ Autowired
3536 private ITestAuthenticator auth ;
3637
3738 // tests
3839
3940 @ Test
40- public final void whenAuthenticationIsCreated_then201IsReceived () {
41+ public final void whenAuthenticationIsPerformed_then200IsReceived () {
4142 // When
42- final Response response = givenAuthenticated ().contentType (APPLICATION_JSON .toString ()).post (paths .getAuthenticationUri ());
43+ final Response response = givenAuthenticated ().contentType (APPLICATION_JSON .toString ()).get (paths .getAuthenticationUri ());
4344
4445 // Then
45- assertThat (response .getStatusCode (), is (201 ));
46+ assertThat (response .getStatusCode (), is (200 ));
4647 }
4748
4849 @ Test
49- public final void whenAuthenticationIsCreated_thenResponseHasContent () {
50+ public final void whenAuthenticationIsPerformed_thenResponseHasContent () {
5051 // When
5152 final Response response = givenAuthenticated ().contentType (APPLICATION_JSON .toString ()).post (paths .getAuthenticationUri ());
5253
@@ -55,18 +56,18 @@ public final void whenAuthenticationIsCreated_thenResponseHasContent() {
5556 }
5657
5758 @ Test
58- public final void whenAuthenticationIsCreated_thenResponseIsPrincipal () {
59+ public final void whenAuthenticationIsPerformed_thenResponseIsPrincipal () {
5960 // When
60- final Response response = givenAuthenticated ().contentType (APPLICATION_JSON .toString ()).post (paths .getAuthenticationUri ());
61+ final Response response = givenAuthenticated ().contentType (APPLICATION_JSON .toString ()).get (paths .getAuthenticationUri ());
6162
6263 // Then
6364 response .as (User .class );
6465 }
6566
6667 @ Test
67- public final void whenAuthenticationIsCreated_thenPrincipalResponseIsCorrect () {
68+ public final void whenAuthenticationIsPerformed_thenPrincipalResponseIsCorrect () {
6869 // When
69- final Response response = givenAuthenticated ().contentType (APPLICATION_JSON .toString ()).post (paths .getAuthenticationUri ());
70+ final Response response = givenAuthenticated ().contentType (APPLICATION_JSON .toString ()).get (paths .getAuthenticationUri ());
7071
7172 // Then
7273 assertEquals (new User (SecurityConstants .EMAIL , SecurityConstants .PASS , null ), response .as (User .class ));
0 commit comments