Skip to content
This repository was archived by the owner on Oct 11, 2018. It is now read-only.

Made parameter package_provider optional. #133

Merged
merged 1 commit into from
Feb 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/fpm/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class php::fpm::package(
$package_name,
$package_ensure,
$package_provider
$package_provider = undef
) {

package { $package_name:
Expand Down
8 changes: 8 additions & 0 deletions spec/classes/fpm/php_fpm_package_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'spec_helper'

describe 'php::fpm::package', :type => :class do
context 'with package_name => php5-fpm' do
let(:params) { {:package_name => 'php5-fpm', :package_ensure => 'installed'} }
it { should contain_package('php5-fpm') }
end
end
8 changes: 8 additions & 0 deletions spec/classes/fpm_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'spec_helper'

describe 'php::fpm', :type => :class do
it { should contain_class('php::fpm::package') }
it { should contain_class('php::fpm::service').that_requires('Package[php5-fpm]') }
it { should contain_php__fpm__config('php-fpm').that_requires('Package[php5-fpm]') }
it { should contain_file('/etc/php5/fpm/php-fpm.conf').that_requires('Package[php5-fpm]') }
end
5 changes: 3 additions & 2 deletions spec/classes/php_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require 'spec_helper'

describe 'php', :type => :class do
it { should contain_class 'php' }
it { should include_class 'php::params' }
it { should compile.with_all_deps }
it { should contain_class('php') }
it { should contain_class('php::params') }
end