diff options
author | TP Honey <tphoney@users.noreply.github.com> | 2017-07-07 18:00:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-07 18:00:08 +0100 |
commit | 5a17bf1c338c74bd6c8dbacc9a05b4cd501ecc23 (patch) | |
tree | 465af9117753d648cdf4df8bba33baec4c7ad295 /spec | |
parent | 578220e62389af8fd7047da77b00171d45896c85 (diff) | |
parent | 530d2ef184d19b965a4c9db2c415c26b80f9d31b (diff) |
Merge pull request #716 from EmersonPrado/MODULES-4377
(Modules 4377) Causes ensure_packages to accept concurrent declarations with ensure => 'present' and 'installed'
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/functions/ensure_packages_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/functions/ensure_packages_spec.rb b/spec/functions/ensure_packages_spec.rb index 1f89785..190e580 100755 --- a/spec/functions/ensure_packages_spec.rb +++ b/spec/functions/ensure_packages_spec.rb @@ -56,4 +56,16 @@ describe 'ensure_packages' do it { expect(lambda { catalogue }).to contain_package('ρǻ¢κầģẻ').with({'ensure' => 'absent'}) } end end + + context 'given a catalog with "package { puppet: ensure => present }"' do + let(:pre_condition) { 'package { puppet: ensure => present }' } + + describe 'after running ensure_package("puppet", { "ensure" => "installed" })' do + before { subject.call(['puppet', { "ensure" => "installed" }]) } + + # this lambda is required due to strangeness within rspec-puppet's expectation handling + it { expect(lambda { catalogue }).to contain_package('puppet').with_ensure('present') } + end + end + end |