apt: Add apt::setting defined type.
[puppet-modules/puppetlabs-apt.git] / spec / defines / key_spec.rb
index dbb67c4c57439beec2679ea7d2005448b74c9d55..d622ecbcbc5ca9e881a6b87d0ef8eb83a2bddf3a 100644 (file)
@@ -1,8 +1,8 @@
 require 'spec_helper'
 
 describe 'apt::key', :type => :define do
-  let(:facts) { { :lsbdistid => 'Debian' } }
-  GPG_KEY_ID = '4BD6EC30'
+  let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian' } }
+  GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
 
   let :title do
     GPG_KEY_ID
@@ -276,7 +276,7 @@ describe 'apt::key', :type => :define do
     describe 'duplication' do
       context 'two apt::key resources for same key, different titles' do
         let :pre_condition do
-          "apt::key { 'duplicate': key => #{title}, }"
+          "apt::key { 'duplicate': key => '#{title}', }"
         end
 
         it 'contains two apt::key resources' do
@@ -305,7 +305,7 @@ describe 'apt::key', :type => :define do
 
       context 'two apt::key resources, different ensure' do
         let :pre_condition do
-          "apt::key { 'duplicate': key => #{title}, ensure => 'absent', }"
+          "apt::key { 'duplicate': key => '#{title}', ensure => 'absent', }"
         end
         it 'informs the user of the impossibility' do
           expect { subject }.to raise_error(/already ensured as absent/)