Page MenuHomeSoftware Heritage

php_repo_ubuntu_spec.rb
No OneTemporary

php_repo_ubuntu_spec.rb

require 'spec_helper'
describe 'php::repo::ubuntu', type: :class do
on_supported_os.each do |os, facts|
context "on #{os}" do
let :facts do
facts
end
case facts[:lsbdistcodename]
when 'trusty'
describe 'when called with no parameters on Ubuntu trusty' do
it { is_expected.to contain_exec('add-apt-repository-ppa:ondrej/php') }
end
describe 'when called with version 7.0 on Ubuntu trusty' do
let(:params) do
{
version: '7.0'
}
end
it { is_expected.to contain_exec('add-apt-repository-ppa:ondrej/php') }
end
describe 'when call with version 5.6 on Ubuntu trusty' do
let(:params) do
{
version: '5.6'
}
end
it { is_expected.to contain_exec('add-apt-repository-ppa:ondrej/php') }
end
describe 'when call with version 5.4 on Ubuntu trusty' do
let(:params) do
{
version: '5.4'
}
end
it { expect { is_expected.to raise_error(Puppet::Error) } }
end
end
end
end
end

File Metadata

Mime Type
text/x-ruby
Expires
Fri, Jul 4, 1:15 PM (1 w, 5 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3401811

Event Timeline