summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@getchef.com>2014-06-05 13:23:16 -0700
committerBryan McLellan <btm@getchef.com>2014-06-05 13:23:16 -0700
commit02f5756a667f67d615014746c649883eabd891b3 (patch)
tree5c16f1045ac03bdca7e5901fd06b8f2000f457cc
parent4ec86064ac88c1357e65dabc18a6860c6f499d13 (diff)
downloadchef-02f5756a667f67d615014746c649883eabd891b3.tar.gz
CHEF-5113: Add a unit test
-rw-r--r--spec/unit/provider/package/apt_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/provider/package/apt_spec.rb b/spec/unit/provider/package/apt_spec.rb
index b8e23d8756..a72c09242f 100644
--- a/spec/unit/provider/package/apt_spec.rb
+++ b/spec/unit/provider/package/apt_spec.rb
@@ -169,6 +169,11 @@ SHOWPKG_STDOUT
@provider.load_current_resource
end
+ it "raises an exception if a source is specified (CHEF-5113)" do
+ @new_resource.source "pluto"
+ @provider.define_resource_requirements
+ expect { @provider.run_action(:install) }.to raise_error(Chef::Exceptions::Package)
+ end
end
context "after loading the current resource" do