summaryrefslogtreecommitdiff
path: root/spec/unit/resource/apt_package_spec.rb
diff options
context:
space:
mode:
authorKapil Chouhan <kapil.chouhan@msystechnologies.com>2019-03-19 16:47:26 +0530
committerKapil Chouhan <kapil.chouhan@msystechnologies.com>2019-05-07 14:04:03 +0530
commit38c62c0c14794045154d886ffaf6f27778e659dd (patch)
tree0e563f420fce95ed1af6a7b21b187bc08e560647 /spec/unit/resource/apt_package_spec.rb
parent66c0fdeb65c19d267bd501550e60cd16d7bb4901 (diff)
downloadchef-38c62c0c14794045154d886ffaf6f27778e659dd.tar.gz
Move response_file and response_file_variables out of base package resource
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> Fix for Move response_file and response_file_variables out of base package resource Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> update require changes Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> Updated require changes Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> Fixed some unit test cases Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
Diffstat (limited to 'spec/unit/resource/apt_package_spec.rb')
-rw-r--r--spec/unit/resource/apt_package_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/resource/apt_package_spec.rb b/spec/unit/resource/apt_package_spec.rb
index 66fe05ef33..c39c768ae2 100644
--- a/spec/unit/resource/apt_package_spec.rb
+++ b/spec/unit/resource/apt_package_spec.rb
@@ -53,4 +53,14 @@ describe Chef::Resource::AptPackage, "initialize" do
it "should preserve configuration files by default" do
expect(resource.overwrite_config_files).to eql(false)
end
+
+ it "accepts a string for the response file" do
+ resource.response_file "something"
+ expect(resource.response_file).to eql("something")
+ end
+
+ it "accepts a hash for response file template variables" do
+ resource.response_file_variables({ variables: true })
+ expect(resource.response_file_variables).to eql({ variables: true })
+ end
end