diff options
author | Tim Smith <tsmith@chef.io> | 2017-04-28 11:54:55 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2017-05-12 09:29:33 -0700 |
commit | 874a530a917a4abd8fb1876309d7f2895f0ff461 (patch) | |
tree | 779a70538f4a281c31adffbf4485e4d61d419485 | |
parent | ca63f97a0e750d4256cd57106e339686f8631dff (diff) | |
download | chef-874a530a917a4abd8fb1876309d7f2895f0ff461.tar.gz |
Test that the sanitized names work
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | spec/unit/provider/apt_preference_spec.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/unit/provider/apt_preference_spec.rb b/spec/unit/provider/apt_preference_spec.rb index 3b529c81b9..4ea33cd5a8 100644 --- a/spec/unit/provider/apt_preference_spec.rb +++ b/spec/unit/provider/apt_preference_spec.rb @@ -20,7 +20,7 @@ require "spec_helper" describe Chef::Provider::AptPreference do - let(:new_resource) { Chef::Resource::AptPreference.new("libmysqlclient16") } + let(:new_resource) { Chef::Resource::AptPreference.new("libmysqlclient16.1*") } let(:pref_dir) { Dir.mktmpdir("apt_pref_d") } before do @@ -53,12 +53,10 @@ describe Chef::Provider::AptPreference do expect(File.directory?(pref_dir)).to be true end - it "creates an apt .pref file" do - # something - end - - it "creates an apt .pref file with a sanitized filename" do - # something + it "creates a sanitized .pref file" do + provider.run_action(:add) + expect(new_resource).to be_updated_by_last_action + expect(File.exist?(::File.join(pref_dir,'libmysqlclient16_1wildcard.pref'))).to be true end end end |