summaryrefslogtreecommitdiff
path: root/spec/unit/encrypted_data_bag_item_spec.rb
diff options
context:
space:
mode:
authorXabier de Zuazo <xabier@onddo.com>2014-12-03 06:35:22 +0100
committerLamont Granquist <lamont@scriptkiddie.org>2015-01-27 12:04:44 -0800
commit5f09a024610dd5ed992faa42624beced6f6e3ed3 (patch)
treef08aba90fe1bf66043b5ff7282440f41b89eb9c4 /spec/unit/encrypted_data_bag_item_spec.rb
parent74770bd862180d90e0d2c5381ad74dd7ec637242 (diff)
downloadchef-5f09a024610dd5ed992faa42624beced6f6e3ed3.tar.gz
EncryptedDataBagItem: remove Cipher#auth_data method existence check (ruby 1.8 specific, issue #2497)
Diffstat (limited to 'spec/unit/encrypted_data_bag_item_spec.rb')
-rw-r--r--spec/unit/encrypted_data_bag_item_spec.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/spec/unit/encrypted_data_bag_item_spec.rb b/spec/unit/encrypted_data_bag_item_spec.rb
index 14afea507c..0a4306727b 100644
--- a/spec/unit/encrypted_data_bag_item_spec.rb
+++ b/spec/unit/encrypted_data_bag_item_spec.rb
@@ -124,14 +124,6 @@ describe Chef::EncryptedDataBagItem::Encryptor do
context "on unsupported platforms" do
let(:aead_algorithm) { Chef::EncryptedDataBagItem::AEAD_ALGORITHM }
- it "throws an error warning about the Ruby version if it has no GCM support" do
- # Force OpenSSL with AEAD support
- allow(OpenSSL::Cipher).to receive(:ciphers).and_return([ aead_algorithm ])
- # Ruby without AEAD support
- expect(OpenSSL::Cipher).to receive(:method_defined?).with(:auth_data=).and_return(false)
- expect { encryptor }.to raise_error(Chef::EncryptedDataBagItem::EncryptedDataBagRequirementsFailure, /requires Ruby/)
- end
-
it "throws an error warning about the OpenSSL version if it has no GCM support" do
# Force Ruby with AEAD support
allow(OpenSSL::Cipher).to receive(:method_defined?).with(:auth_data=).and_return(true)
@@ -140,14 +132,6 @@ describe Chef::EncryptedDataBagItem::Encryptor do
expect { encryptor }.to raise_error(Chef::EncryptedDataBagItem::EncryptedDataBagRequirementsFailure, /requires an OpenSSL/)
end
- context "on platforms with old Ruby", :ruby_lt_20 do
-
- it "throws an error warning about the Ruby version" do
- expect { encryptor }.to raise_error(Chef::EncryptedDataBagItem::EncryptedDataBagRequirementsFailure, /requires Ruby/)
- end
-
- end # context on platforms with old Ruby
-
context "on platforms with old OpenSSL", :openssl_lt_101 do
it "throws an error warning about the OpenSSL version" do
@@ -214,14 +198,6 @@ describe Chef::EncryptedDataBagItem::Decryptor do
}
end
- context "on platforms with old Ruby", :ruby_lt_20 do
-
- it "throws an error warning about the Ruby version" do
- expect { decryptor }.to raise_error(Chef::EncryptedDataBagItem::EncryptedDataBagRequirementsFailure, /requires Ruby/)
- end
-
- end # context on platforms with old Ruby
-
context "on platforms with old OpenSSL", :openssl_lt_101 do
it "throws an error warning about the OpenSSL version" do