From 02f5756a667f67d615014746c649883eabd891b3 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 5 Jun 2014 13:23:16 -0700 Subject: CHEF-5113: Add a unit test --- spec/unit/provider/package/apt_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.1