test/pgp_test.rb in iostreams-0.12.0 vs test/pgp_test.rb in iostreams-0.12.1
- old
+ new
@@ -1,8 +1,8 @@
require_relative 'test_helper'
-#IOStreams::Pgp.logger = SemanticLogger[IOStreams::Pgp]
+#IOStreams::Pgp.logger = Logger.new(STDOUT)
module Streams
class PgpTest < Minitest::Test
describe IOStreams::Pgp::Reader do
let :user_name do
@@ -116,10 +116,15 @@
assert_equal generated_key_id, key[:key_id]
assert_equal 1024, key[:key_length]
assert_equal 'R', key[:key_type]
assert_equal user_name, key[:name]
refute key[:private], key
- assert_equal 'ultimate', key[:trust]
+ ver = IOStreams::Pgp.pgp_version
+ ap "Running PGP tests with #{IOStreams::Pgp.executable} v#{ver}"
+ maint = ver.split('.').last.to_i
+ if (ver.to_f >= 2) && (maint >= 30)
+ assert_equal 'ultimate', key[:trust]
+ end
end
it 'lists private keys' do
assert keys = IOStreams::Pgp.list_keys(email: email, private: true)
assert_equal 1, keys.size