aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/test
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2015-09-29 20:20:26 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2015-09-30 14:41:09 +0200
commitf461d6b1d83604d6752ac97128403ff2a34ddec4 (patch)
tree896252aea18b684a92438da72ff8f662a842fb32 /OpenKeychain/src/test
parent5b6c04cbfb08b021864c70478a25b13543e86206 (diff)
downloadopen-keychain-f461d6b1d83604d6752ac97128403ff2a34ddec4.tar.gz
open-keychain-f461d6b1d83604d6752ac97128403ff2a34ddec4.tar.bz2
open-keychain-f461d6b1d83604d6752ac97128403ff2a34ddec4.zip
decryptverify: add trivial detection of pgp ascii-armored data
Diffstat (limited to 'OpenKeychain/src/test')
-rw-r--r--OpenKeychain/src/test/java/org/sufficientlysecure/keychain/operations/ExportTest.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/operations/ExportTest.java b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/operations/ExportTest.java
index 4d4915e8d..e88dc95fc 100644
--- a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/operations/ExportTest.java
+++ b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/operations/ExportTest.java
@@ -354,6 +354,9 @@ public class ExportTest {
"backup_" + KeyFormattingUtils.convertKeyIdToHex(mStaticRing1.getMasterKeyId()) + ".pub.asc",
result.getDecryptionMetadata().getFilename());
+ assertEquals("mime type for pgp keys must be correctly detected",
+ "application/pgp-keys", result.getDecryptionMetadata().getMimeType());
+
TestingUtils.assertArrayEqualsPrefix("exported data must start with ascii armor header",
"-----BEGIN PGP PUBLIC KEY BLOCK-----\n".getBytes(), result.getOutputBytes());
TestingUtils.assertArrayEqualsSuffix("exported data must end with ascii armor header",