(maint) Update the gpg key
[puppet-modules/puppetlabs-apt.git] / spec / defines / source_spec.rb
index cfae55cc8f7e2ae01989a4fd2e26dedde6687bad..bf6977a39dd0e0f4cf456bf890615f1010391bc2 100644 (file)
@@ -1,7 +1,7 @@
 require 'spec_helper'
 
 describe 'apt::source' do
-  GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
+  GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
 
   let :pre_condition do
     'class { "apt": }'
@@ -387,5 +387,58 @@ describe 'apt::source' do
       end
     end
 
+    context "with notify_update = undef (default)" do
+      let :facts do
+        {
+          :lsbdistid       => 'Debian',
+          :lsbdistcodename => 'wheezy',
+          :osfamily        => 'Debian',
+          :puppetversion   => Puppet.version,
+        }
+      end
+      let :params do
+        {
+          :location      => 'hello.there',
+        }
+      end
+      it { is_expected.to contain_apt__setting("list-#{title}").with_notify_update(true) }
+    end
+
+    context "with notify_update = true" do
+      let :facts do
+        {
+          :lsbdistid       => 'Debian',
+          :lsbdistcodename => 'wheezy',
+          :osfamily        => 'Debian',
+          :puppetversion   => Puppet.version,
+        }
+      end
+      let :params do
+        {
+          :location      => 'hello.there',
+          :notify_update => true,
+        }
+      end
+      it { is_expected.to contain_apt__setting("list-#{title}").with_notify_update(true) }
+    end
+
+    context "with notify_update = false" do
+      let :facts do
+        {
+          :lsbdistid       => 'Debian',
+          :lsbdistcodename => 'wheezy',
+          :osfamily        => 'Debian',
+          :puppetversion   => Puppet.version,
+        }
+      end
+      let :params do
+        {
+          :location      => 'hello.there',
+          :notify_update => false,
+        }
+      end
+      it { is_expected.to contain_apt__setting("list-#{title}").with_notify_update(false) }
+    end
+
   end
 end