Commit 45ab52fc authored by Lance Albertson's avatar Lance Albertson
Browse files

Test directives properity in unit tests and provide an example


Signed-off-by: default avatarLance Albertson <lance@osuosl.org>
parent b093c9d6
require 'spec_helper'
describe 'apache2_mod_auth_cas' do
step_into :apache2_install, :apache2_mod_auth_cas
step_into :apache2_install, :apache2_mod_auth_cas, :apache2_module
recipe do
apache2_install 'package'
apache2_mod_auth_cas
apache2_mod_auth_cas 'default' do
directives(CASDebug: 'Off')
end
end
context 'ubuntu' do
platform 'ubuntu'
......@@ -23,7 +25,9 @@ describe 'apache2_mod_auth_cas' do
cache_dir: '/var/cache/apache2',
login_url: 'https://login.example.org/cas/login',
validate_url: 'https://login.example.org/cas/serviceValidate',
directives: nil,
directives: {
'CASDebug': 'Off',
},
}
)
end
......@@ -35,5 +39,14 @@ describe 'apache2_mod_auth_cas' do
mode: '0700'
)
end
[
%r{^CASCookiePath /var/cache/apache2/mod_auth_cas/$},
%r{^CASLoginURL https://login.example.org/cas/login$},
%r{^CASValidateURL https://login.example.org/cas/serviceValidate$},
/^CASDebug Off$/,
].each do |line|
it { is_expected.to render_file('/etc/apache2/mods-available/auth_cas.conf').with_content(line) }
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment