aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain-Test
diff options
context:
space:
mode:
Diffstat (limited to 'OpenKeychain-Test')
-rw-r--r--OpenKeychain-Test/build.gradle2
-rw-r--r--OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperationTest.java6
2 files changed, 7 insertions, 1 deletions
diff --git a/OpenKeychain-Test/build.gradle b/OpenKeychain-Test/build.gradle
index f621428ed..25f955dd1 100644
--- a/OpenKeychain-Test/build.gradle
+++ b/OpenKeychain-Test/build.gradle
@@ -16,7 +16,7 @@ apply plugin: 'jacoco'
dependencies {
testCompile 'junit:junit:4.11'
testCompile 'com.google.android:android:4.1.1.4'
- testCompile('com.squareup:fest-android:1.0.+') { exclude module: 'support-v4' }
+ testCompile('com.squareup:fest-android:1.0.8') { exclude module: 'support-v4' }
testCompile ('org.robolectric:robolectric:2.3') {
exclude module: 'classworlds'
exclude module: 'maven-artifact'
diff --git a/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperationTest.java b/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperationTest.java
index dd2feb825..8feff4cc4 100644
--- a/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperationTest.java
+++ b/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperationTest.java
@@ -536,6 +536,12 @@ public class PgpKeyOperationTest {
expiry, modified.getPublicKey(keyId).getUnsafeExpiryTimeForTesting().getTime() / 1000);
Assert.assertEquals("modified key must have same flags as before",
ring.getPublicKey(keyId).getKeyUsage(), modified.getPublicKey(keyId).getKeyUsage());
+
+ Date date = modified.canonicalize(new OperationLog(), 0).getPublicKey().getExpiryTime();
+ Assert.assertNotNull("modified key must have an expiry date", date);
+ Assert.assertEquals("modified key must have expected expiry date",
+ expiry, date.getTime() / 1000);
+
}
{