Merge pull request #69 from branan/fix_source_test
[puppet-modules/puppetlabs-apt.git] / spec / defines / source_spec.rb
index 02bc45fcbebd3256b0f8256b292be68611828adc..583c6190d4689454ec5f95162a2363f4f5662037 100644 (file)
@@ -22,7 +22,7 @@ describe 'apt::source', :type => :define do
 
   [{},
    {
-      :location           => 'somewhere',
+      :location           => 'http://example.com',
       :release            => 'precise',
       :repos              => 'security',
       :include_src        => false,
@@ -39,7 +39,7 @@ describe 'apt::source', :type => :define do
     },
     {
       :ensure             => 'absent',
-      :location           => 'somewhere',
+      :location           => 'http://example.com',
       :release            => 'precise',
       :repos              => 'security',
     }
@@ -84,12 +84,12 @@ describe 'apt::source', :type => :define do
 
       it {
         if param_hash[:pin]
-          should contain_apt__pin(param_hash[:release]).with({
+          should contain_apt__pin(title).with({
             "priority"  => param_hash[:pin],
             "before"    => "File[#{title}.list]"
           })
         else
-          should_not contain_apt__pin(param_hash[:release]).with({
+          should_not contain_apt__pin(title).with({
             "priority"  => param_hash[:pin],
             "before"    => "File[#{title}.list]"
           })
@@ -97,9 +97,8 @@ describe 'apt::source', :type => :define do
       }
 
       it {
-        should contain_exec("#{title} apt update").with({
+        should contain_exec("apt_update").with({
           "command"     => "/usr/bin/apt-get update",
-          "subscribe"   => "File[#{title}.list]",
           "refreshonly" => true
         })
       }