summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorVasu1105 <vasundhara.jagdale@msystechnologies.com>2017-12-07 09:02:01 +0000
committerVasu1105 <vasundhara.jagdale@msystechnologies.com>2017-12-26 08:38:42 +0000
commit4da3e139ccce5ca9813ec2900109cf3cee3b130d (patch)
treee72b29dd18150d58c1773ff4fccd10fc0377cbd0 /spec/support
parentbfe8487a26f99d3cd3e08fffea8cf6457631cf69 (diff)
downloadchef-4da3e139ccce5ca9813ec2900109cf3cee3b130d.tar.gz
[MSYS-725] [chef#6073] allow forcing senistive to false on execute and batch resource
Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/shared/unit/execute_resource.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/support/shared/unit/execute_resource.rb b/spec/support/shared/unit/execute_resource.rb
index ae56a9697d..c15b02612e 100644
--- a/spec/support/shared/unit/execute_resource.rb
+++ b/spec/support/shared/unit/execute_resource.rb
@@ -139,7 +139,14 @@ shared_examples_for "an execute resource" do
it "should be true if the password is non-nil but the value is explicitly set to false" do
@resource.password("we.funk!")
@resource.sensitive false
- expect(@resource.sensitive).to eq(true)
+ expect(@resource.sensitive).to eq(false)
+ end
+
+ # added this test to ensure setting of password property after or before sensitive does not matter
+ it "should be false if the sensitive is set before password property" do
+ @resource.sensitive false
+ @resource.password("we.funk!")
+ expect(@resource.sensitive).to eq(false)
end
end