summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Bostock <matt@mattbostock.com>2016-01-08 11:06:57 +0000
committerMatt Bostock <matt@mattbostock.com>2016-01-08 11:09:45 +0000
commit41f9319bbd96547f9c2226524918e4b748527048 (patch)
treed53e3ce1faaab79097569eb7ba82daf91e9d4d8f
parent4acba73b0055f98a4702f99b77af28f83c433b78 (diff)
downloadpuppet-stdlib-41f9319bbd96547f9c2226524918e4b748527048.tar.gz
puppet-stdlib-41f9319bbd96547f9c2226524918e4b748527048.tar.bz2
Change order of tests to be more logical
Put the tests using a valid certificate fixture together and put tests using a valid key fixture together.
-rwxr-xr-xspec/functions/validate_x509_rsa_key_pair_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/functions/validate_x509_rsa_key_pair_spec.rb b/spec/functions/validate_x509_rsa_key_pair_spec.rb
index bfa7e38..eb63310 100755
--- a/spec/functions/validate_x509_rsa_key_pair_spec.rb
+++ b/spec/functions/validate_x509_rsa_key_pair_spec.rb
@@ -126,10 +126,6 @@ EOS
end
context 'bad input' do
- describe 'valid but indented certificate, valid key' do
- it { is_expected.to run.with_params(valid_cert_but_indented, valid_key).and_raise_error(Puppet::ParseError, /Not a valid x509 certificate/) }
- end
-
describe 'valid certificate, valid but indented key' do
it { is_expected.to run.with_params(valid_cert, valid_key_but_indented).and_raise_error(Puppet::ParseError, /Not a valid RSA key/) }
end
@@ -138,14 +134,18 @@ EOS
it { is_expected.to run.with_params(valid_cert, malformed_key).and_raise_error(Puppet::ParseError, /Not a valid RSA key/) }
end
- describe 'malformed certificate, valid key' do
- it { is_expected.to run.with_params(malformed_cert, valid_key).and_raise_error(Puppet::ParseError, /Not a valid x509 certificate/) }
- end
-
describe 'valid certificate, bad key' do
it { is_expected.to run.with_params(valid_cert, bad_key).and_raise_error(Puppet::ParseError, /Not a valid RSA key/) }
end
+ describe 'valid but indented certificate, valid key' do
+ it { is_expected.to run.with_params(valid_cert_but_indented, valid_key).and_raise_error(Puppet::ParseError, /Not a valid x509 certificate/) }
+ end
+
+ describe 'malformed certificate, valid key' do
+ it { is_expected.to run.with_params(malformed_cert, valid_key).and_raise_error(Puppet::ParseError, /Not a valid x509 certificate/) }
+ end
+
describe 'bad certificate, valid key' do
it { is_expected.to run.with_params(bad_cert, valid_key).and_raise_error(Puppet::ParseError, /Not a valid x509 certificate/) }
end