aboutsummaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorMelissa <melissa@puppet.com>2018-11-28 14:13:47 -0800
committerGitHub <noreply@github.com>2018-11-28 14:13:47 -0800
commit33045c209e0d692792d9059d0130617cf8eaf2ce (patch)
tree50a4e412de3839e45d691ce355992b001a03aaf7 /spec/unit
parentb51bd4961934fe0dc50f91955be02df6ee3711a2 (diff)
parent15696869bc4b62b47b5e6b873694635b2dc86c0d (diff)
downloadpuppet-sshkeys_core-33045c209e0d692792d9059d0130617cf8eaf2ce.tar.gz
puppet-sshkeys_core-33045c209e0d692792d9059d0130617cf8eaf2ce.tar.bz2
Merge pull request #12 from puppetlabs/modules8182
Expand test coverage
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/type/ssh_authorized_key_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/unit/type/ssh_authorized_key_spec.rb b/spec/unit/type/ssh_authorized_key_spec.rb
index e375f58..866c688 100644
--- a/spec/unit/type/ssh_authorized_key_spec.rb
+++ b/spec/unit/type/ssh_authorized_key_spec.rb
@@ -141,12 +141,14 @@ describe Puppet::Type.type(:ssh_authorized_key), unless: Puppet.features.microso
it 'property should return well formed string of arrays from is_to_s' do
resource = described_class.new(name: 'whev', type: :rsa, user: 'nobody', options: ['a', 'b', 'c'])
- expect(resource.property(:options).is_to_s(['a', 'b', 'c'])).to eq "['a', 'b', 'c']"
+ str = (Puppet.version.to_f < 5.0) ? ['a', 'b', 'c'] : "['a', 'b', 'c']"
+ expect(resource.property(:options).is_to_s(['a', 'b', 'c'])).to eq(str)
end
it 'property should return well formed string of arrays from should_to_s' do
resource = described_class.new(name: 'whev', type: :rsa, user: 'nobody', options: ['a', 'b', 'c'])
- expect(resource.property(:options).should_to_s(['a', 'b', 'c'])).to eq "['a', 'b', 'c']"
+ str = (Puppet.version.to_f < 5.0) ? 'a b c' : "['a', 'b', 'c']"
+ expect(resource.property(:options).should_to_s(['a', 'b', 'c'])).to eq(str)
end
end