mirror of
https://github.com/inspec/inspec
synced 2025-02-16 22:18:38 +00:00
CFINSPEC-267: resource_id unit test: key_rsa
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
parent
fb76150b3b
commit
db9f7f4466
1 changed files with 2 additions and 0 deletions
|
@ -7,9 +7,11 @@ describe "Inspec::Resources::RsaKey" do
|
|||
|
||||
it "parses the public key" do
|
||||
_(resource_key.send("public_key")).must_match "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxi1Tp4dPQ+GU+RipsguU\nWT50a6fsBCpe+QT0YdW/7GG6kynRzR+fzQ0q1LDxpgqAH+eDIWEAFYoTPc8haAjZ\nvAYn7JlXUQpeoK7fc2BPgYA0lr33Ee0H9nqeZlnytQ+/EVUqqDx61cgeW3ARAK1I\nODwhuziuTi7XNu+HTx3feH4ohq/FppB26PYfJo1jCmt7YxHxl6AGrYrEX5zubQR0\nAtPAJzg0/aqDH5GJHJETjloIxh/KLnGlbG3DJylFU+vPxvns1TKM0dezg8UefXer\nRtxDAwSix7sNctXwa0xToc6O+e/StNPR0eLvILS8iR89fuML57Z4AGFWMNdqTYoj\nqwIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
_(resource_key.resource_id).must_equal "test_certificate.rsa.key.pem"
|
||||
end
|
||||
|
||||
it "decodes the key length" do
|
||||
_(resource_key.send("key_length")).must_equal 2048
|
||||
_(resource_key.resource_id).must_equal "test_certificate.rsa.key.pem"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue