summaryrefslogtreecommitdiff
path: root/spec/functions/defined_with_params_spec.rb
diff options
context:
space:
mode:
authorPaula McMaw <paula@puppet.com>2017-05-10 11:00:48 +0100
committerGitHub <noreply@github.com>2017-05-10 11:00:48 +0100
commit18620765d5a732a87214c8ac6e21ddf00b25ec83 (patch)
tree65b67776a89d9dd640c6fada8266a233bfe7e95d /spec/functions/defined_with_params_spec.rb
parent052d55b046706b6d68b69ac91e8d688009b3fdc1 (diff)
parent51fd72ca4accb2760a364d65dfe6f9b672f68d83 (diff)
Merge pull request #776 from puppetlabs/release
Merge back 4.17.0
Diffstat (limited to 'spec/functions/defined_with_params_spec.rb')
-rwxr-xr-xspec/functions/defined_with_params_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/functions/defined_with_params_spec.rb b/spec/functions/defined_with_params_spec.rb
index 7118d85..491a03b 100755
--- a/spec/functions/defined_with_params_spec.rb
+++ b/spec/functions/defined_with_params_spec.rb
@@ -55,4 +55,14 @@ describe 'defined_with_params' do
end
end
end
+
+ describe 'when passed a defined type' do
+ let :pre_condition do
+ 'test::deftype { "foo": }'
+ end
+ it { is_expected.to run.with_params('Test::Deftype[foo]', {}).and_return(true) }
+ it { is_expected.to run.with_params('Test::Deftype[bar]', {}).and_return(false) }
+ it { is_expected.to run.with_params(Puppet::Resource.new('Test::Deftype[foo]'), {}).and_return(true) }
+ it { is_expected.to run.with_params(Puppet::Resource.new('Test::Deftype[bar]'), {}).and_return(false) }
+ end
end