- my @parts = RT::Crypt::GnuPG::FindProtectedParts( Entity => $entity );
- is( scalar @parts, 0, 'no protected parts' );
+ my @parts;
+ warning_like { @parts = RT::Crypt->FindProtectedParts( Entity => $entity ) }
+ qr{Entity is 'multipart/encrypted', but has no protocol defined. Checking for PGP part};
+ is( scalar @parts, 1, 'one protected part' );
+ is( $parts[0]->{'Type'}, 'encrypted', "have encrypted part" );
+ is( $parts[0]->{'Format'}, 'RFC3156', "RFC3156 format" );
+ is( $parts[0]->{'Top'}, $entity, "it's the same entity" );