Skip to content

Commit 6573503

Browse files
author
Steven Post
committed
Add basic test for the default charset
1 parent de59032 commit 6573503

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

spec/classes/apache_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@
110110
it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^AllowEncodedSlashes nodecode$} }
111111
end
112112

113+
context "when specifying default character set" do
114+
let :params do
115+
{ :default_charset => 'none' }
116+
end
117+
118+
it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^AddDefaultCharset none$} }
119+
end
120+
113121
# Assert that both load files and conf files are placed and symlinked for these mods
114122
[
115123
'alias',
@@ -337,6 +345,14 @@
337345
it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^AllowEncodedSlashes nodecode$} }
338346
end
339347

348+
context "when specifying default character set" do
349+
let :params do
350+
{ :default_charset => 'none' }
351+
end
352+
353+
it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^AddDefaultCharset none$} }
354+
end
355+
340356
it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/site\.d/\*"$} }
341357
it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/mod\.d/\*\.conf"$} }
342358
it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/mod\.d/\*\.load"$} }

0 commit comments

Comments
 (0)