Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jweisner committed Oct 22, 2014
1 parent 3e50bae commit adb90bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/acceptance/mod_php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class { 'apache::mod::php': }
end
end

context "custom extensions, php_admin_flag, and php_admin_value" do
context "custom extensions, php_flag, php_value, php_admin_flag, and php_admin_value" do
it 'succeeds in puppeting php' do
pp= <<-EOS
class { 'apache':
Expand All @@ -65,6 +65,8 @@ class { 'apache::mod::php':
apache::vhost { 'php.example.com':
port => '80',
docroot => '/var/www/php',
php_values => { 'include_path' => '.:/usr/share/pear:/usr/bin/php', },
php_flags => { 'display_errors' => 'on', },
php_admin_values => { 'open_basedir' => '/var/www/php/:/usr/share/pear/', },
php_admin_flags => { 'engine' => 'on', },
}
Expand All @@ -83,6 +85,8 @@ class { 'apache::mod::php':
end

describe file("#{vhost_dir}/25-php.example.com.conf") do
it { is_expected.to contain " php_flag display_errors on" }
it { is_expected.to contain " php_value include_path .:/usr/share/pear:/usr/bin/php" }
it { is_expected.to contain " php_admin_flag engine on" }
it { is_expected.to contain " php_admin_value open_basedir /var/www/php/:/usr/share/pear/" }
end
Expand Down

0 comments on commit adb90bf

Please sign in to comment.