mirror of
https://github.com/usatiuk/y.git
synced 2025-10-29 02:37:49 +01:00
fix tests
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
.profileCard {
|
.profileCard {
|
||||||
|
flex-grow: 0;
|
||||||
margin: 0.2rem;
|
margin: 0.2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,7 @@ public class TokenServiceImpl implements TokenService {
|
|||||||
|
|
||||||
public TokenServiceImpl(@Value("${jwt.secret}") String secret) {
|
public TokenServiceImpl(@Value("${jwt.secret}") String secret) {
|
||||||
// FIXME:
|
// FIXME:
|
||||||
this.key = Keys.hmacShaKeyFor(Decoders.BASE64.decode(Encoders.BASE64.encode(secret.getBytes())));
|
this.key = Keys.hmacShaKeyFor(secret.getBytes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public class PostControllerTest extends DemoDataDbTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void shouldGetPostsByFollowees() {
|
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);
|
HttpMethod.GET, new HttpEntity<>(createAuthHeaders(person3Auth)), PostTo[].class);
|
||||||
|
|
||||||
Assertions.assertEquals(HttpStatus.OK, response.getStatusCode());
|
Assertions.assertEquals(HttpStatus.OK, response.getStatusCode());
|
||||||
|
|||||||
Reference in New Issue
Block a user