aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-05-21 12:45:15 +0300
committerGravatar Vitaly Takmazov2020-05-21 12:45:15 +0300
commit6e5e857a967579f3050f4cbb6ab07da2cd9b0e49 (patch)
tree0293d1a52af414e4d7b82eb2322a972ef2b68439 /src/test/java
parent8dc6f5a8358cd4f0eceef46109592c45f26547ea (diff)
Fix build with new http-signatures-java library
* cleanup deprecation warnings
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index aad85884..43a0dc7b 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -429,8 +429,6 @@ public class ServerTests {
messagesService.deleteMessage(user.getUid(), mid4);
}
- public ExpectedException exception = ExpectedException.none();
-
@Test
public void likeTypeStatsTests() {
User dsdss = userService.createUser("dsdss", "secret").orElseThrow(IllegalStateException::new);
@@ -1929,7 +1927,7 @@ public class ServerTests {
restServiceServer.expect(times(3), requestTo(testuserkeyUri))
.andRespond(withSuccess(testuserResponseString, MediaType.APPLICATION_JSON));
Person testuser = (Person) signatureManager.getContext(testuserUri).get();
- Assert.assertThat(testuser.getPublicKey().getPublicKeyPem(), is(testKeystoreManager.getPublicKeyPem()));
+ assertThat(testuser.getPublicKey().getPublicKeyPem(), is(testKeystoreManager.getPublicKeyPem()));
Instant now2 = Instant.now();
String testRequestDate = DateFormattersHolder.getHttpDateFormatter().format(now2);
String inboxUri = "/api/inbox";
@@ -2390,12 +2388,12 @@ public class ServerTests {
Jws<Claims> jwt = Jwts.parserBuilder()
.setSigningKey(publicKeyGenerated).build()
.parseClaimsJws(secret);
- Assert.assertThat(jwt.getHeader().get("kid"), is("keyid"));
- Assert.assertThat(jwt.getHeader().get("alg"), is("ES256"));
+ assertThat(jwt.getHeader().get("kid"), is("keyid"));
+ assertThat(jwt.getHeader().get("alg"), is("ES256"));
Claims claims = jwt.getBody();
- Assert.assertThat(claims.get("iss"), is("teamid"));
- Assert.assertThat(claims.get("sub"), is("com.example.app"));
- Assert.assertThat(claims.get("aud"), is("https://appleid.apple.com"));
+ assertThat(claims.get("iss"), is("teamid"));
+ assertThat(claims.get("sub"), is("com.example.app"));
+ assertThat(claims.get("aud"), is("https://appleid.apple.com"));
}
@Test