Browse Source

(#12522) Adjust spec test for splitting purge

Now that the purge parameter is split into two, the spec test needs
adjusted. This commit makes that adjustment.
Ryan Coleman 12 năm trước cách đây
mục cha
commit
be2cc3e
1 tập tin đã thay đổi với 6 bổ sung4 xóa
  1. 6 4
      spec/classes/apt_spec.rb

+ 6 - 4
spec/classes/apt_spec.rb

@@ -4,7 +4,8 @@ describe 'apt', :type => :class do
     {
       :disable_keys => :undef,
       :always_apt_update => false,
-      :purge => false
+      :purge_sources_list => false,
+      :purge_sources_list_d => false,
     }
   end
 
@@ -14,7 +15,8 @@ describe 'apt', :type => :class do
       :always_apt_update => true,
       :proxy_host => true,
       :proxy_port => '3128',
-      :purge => true
+      :purge_sources_list => true,
+      :purge_sources_list_d => true,
     },
     {
       :disable_keys => false
@@ -42,7 +44,7 @@ describe 'apt', :type => :class do
       it { should contain_package("python-software-properties") }
 
       it {
-        if param_hash[:purge]
+        if param_hash[:purge_sources_list]
         should contain_file("sources.list").with({
             'path'    => "/etc/apt/sources.list",
             'ensure'  => "present",
@@ -63,7 +65,7 @@ describe 'apt', :type => :class do
         end
       }
       it {
-        if param_hash[:purge]
+        if param_hash[:purge_sources_list_d]
           should create_file("sources.list.d").with({
             'path'    => "/etc/apt/sources.list.d",
             'ensure'  => "directory",