fix tests

This commit is contained in:
Stepan Usatiuk
2023-12-17 14:35:08 +01:00
parent f69c33358b
commit 8940b3d6c6
3 changed files with 3 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
flex-wrap: wrap;
.profileCard {
flex-grow: 0;
margin: 0.2rem;
}
}

View File

@@ -23,7 +23,7 @@ public class TokenServiceImpl implements TokenService {
public TokenServiceImpl(@Value("${jwt.secret}") String secret) {
// FIXME:
this.key = Keys.hmacShaKeyFor(Decoders.BASE64.decode(Encoders.BASE64.encode(secret.getBytes())));
this.key = Keys.hmacShaKeyFor(secret.getBytes());
}
@Override

View File

@@ -75,7 +75,7 @@ public class PostControllerTest extends DemoDataDbTest {
@Test
void shouldGetPostsByFollowees() {
var response = restTemplate.exchange(addr + "/post/following",
var response = restTemplate.exchange(addr + "/post/by-following",
HttpMethod.GET, new HttpEntity<>(createAuthHeaders(person3Auth)), PostTo[].class);
Assertions.assertEquals(HttpStatus.OK, response.getStatusCode());