Ignore:
Timestamp:
Aug 1, 2017, 3:45:14 PM (9 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, debian/jessie
Children:
ce0f6a4
Parents:
bcf0be5 (diff), cd0f9cc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into debian/jessie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/key_spec.rb

    rbcf0be5 rad28f83  
    66  end
    77
    8   let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
    9 
    10   GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
     8  let(:facts) { {
     9    :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     10    :lsbdistid       => 'Debian',
     11    :osfamily        => 'Debian',
     12    :lsbdistcodename => 'wheezy',
     13    :puppetversion   => Puppet.version,
     14  } }
     15
     16  GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
    1117
    1218  let :title do
    … …  
    246252      } end
    247253      it 'fails' do
    248         expect { subject.call }.to raise_error(/is not a string/)
     254        expect { subject.call }.to raise_error(/expects a/)
    249255      end
    250256    end
    … …  
    264270      } end
    265271      it 'fails' do
    266         expect { subject.call }.to raise_error(/is not a string/)
     272        expect { subject.call }.to raise_error(/expects a/)
    267273      end
    268274    end
    269275
    270276    context 'invalid ensure' do
    271       let :params do
    272         {
    273           :ensure => 'foo',
    274         }
    275       end
    276       it 'fails' do
    277         expect { subject.call }.to raise_error(/does not match/)
     277      %w(foo aabsent absenta apresent presenta).each do |param|
     278        let :params do
     279          {
     280            :ensure => param,
     281          }
     282          end
     283        it 'fails' do
     284          expect { subject.call }.to raise_error(/for Enum\['absent', 'present'\], got/)
     285        end
    278286      end
    279287    end
Note: See TracChangeset for help on using the changeset viewer.