summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Bolt <cbolt@denirostaff.com>2015-10-27 11:00:48 -0700
committerJohn Keiser <john@johnkeiser.com>2015-10-27 20:33:05 -0700
commit2c8d87718ee529012e3c1a70202dfff7218dec4f (patch)
treedcbbbf197a32ee16b9cb5c6414637d2365de908d
parentd81a1306abc77d8b69e043f06a14d21547c7fbc6 (diff)
downloadchef-2c8d87718ee529012e3c1a70202dfff7218dec4f.tar.gz
test for default valuechasebolt-sensitive
-rw-r--r--spec/integration/recipes/resource_converge_if_changed_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/integration/recipes/resource_converge_if_changed_spec.rb b/spec/integration/recipes/resource_converge_if_changed_spec.rb
index fb01da5137..362bbcbcaf 100644
--- a/spec/integration/recipes/resource_converge_if_changed_spec.rb
+++ b/spec/integration/recipes/resource_converge_if_changed_spec.rb
@@ -272,6 +272,30 @@ EOM
EOM
end
end
+
+ context "and state1 and state2 are set with sensitive property" do
+ let(:converge_recipe) {
+ <<-EOM
+ #{resource_name} 'blah' do
+ sensitive true
+ state1 'new_state1'
+ state2 'new_state2'
+ end
+ EOM
+ }
+
+ it "the resource is created" do
+ expect(resource.converged).to eq 1
+ expect(resource.updated?).to be_truthy
+ expect(converged_recipe.stdout).to eq <<-EOM
+* #{resource_name}[blah] action create
+ - create default_identity1
+ - set identity1 to (suppressed sensitive properties) (default value)
+ - set state1 to (suppressed sensitive properties)
+ - set state2 to (suppressed sensitive properties)
+EOM
+ end
+ end
end
end