test/test_key.rb in zold-0.16.27 vs test/test_key.rb in zold-0.16.28
- old
+ new
@@ -21,10 +21,11 @@
# SOFTWARE.
require 'minitest/autorun'
require 'tmpdir'
require 'openssl'
+require_relative 'test__helper'
require_relative '../lib/zold/key'
# Key test.
# Author:: Yegor Bugayenko (yegor256@gmail.com)
# Copyright:: Copyright (c) 2018 Yegor Bugayenko
@@ -40,9 +41,15 @@
def test_reads_private_rsa
key = Zold::Key.new(file: 'fixtures/id_rsa')
assert(key.to_pub.start_with?('MIIJJ'))
assert(key.to_pub.end_with?('Sg=='))
+ end
+
+ def test_reads_public_root_rsa
+ key = Zold::Key::ROOT
+ assert(key.to_pub.start_with?('MIICIjANBgkqhkiG9'))
+ assert(key.to_pub.end_with?('3Tp1UCAwEAAQ=='))
end
def test_signs_and_verifies
pub = Zold::Key.new(file: 'fixtures/id_rsa.pub')
pvt = Zold::Key.new(file: 'fixtures/id_rsa')