summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-08-10 16:55:08 -0700
committerTim Smith <tsmith@chef.io>2017-08-10 18:09:52 -0700
commitfd17987a1396db10970194ab05176a679fb3d24b (patch)
tree502024c04a9d35afdb25d31818c086fa69fb00ca
parent1c95e14ffbeac5f154b6f5e4be14a18412667322 (diff)
downloadchef-fd17987a1396db10970194ab05176a679fb3d24b.tar.gz
Fix the apt_preference action to be removepreference_action
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/provider/apt_preference.rb2
-rw-r--r--spec/unit/provider/apt_preference_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/apt_preference.rb b/lib/chef/provider/apt_preference.rb
index d3958ea6fa..55356dab94 100644
--- a/lib/chef/provider/apt_preference.rb
+++ b/lib/chef/provider/apt_preference.rb
@@ -73,7 +73,7 @@ class Chef
end
end
- action :delete do
+ action :remove do
sanitized_prefname = safe_name(new_resource.package_name)
if ::File.exist?("#{APT_PREFERENCE_DIR}/#{sanitized_prefname}.pref")
diff --git a/spec/unit/provider/apt_preference_spec.rb b/spec/unit/provider/apt_preference_spec.rb
index 55c277e6fe..e37dc16ff9 100644
--- a/spec/unit/provider/apt_preference_spec.rb
+++ b/spec/unit/provider/apt_preference_spec.rb
@@ -79,7 +79,7 @@ describe Chef::Provider::AptPreference do
end
it "deletes the name santized .pref file" do
- provider.run_action(:delete)
+ provider.run_action(:remove)
expect(new_resource).to be_updated_by_last_action
expect(File).not_to exist("#{pref_dir}/libmysqlclient16_1wildcard.pref")
end