spec fixes
This commit is contained in:
parent
e6d92383e7
commit
71681c7336
@ -145,7 +145,7 @@ module Apache
|
||||
when :preserve_query_string
|
||||
'QSA'
|
||||
end
|
||||
end
|
||||
end.sort
|
||||
|
||||
@options = !options.empty? ? "[#{options * ','}]" : nil
|
||||
end
|
||||
|
@ -15,7 +15,7 @@ describe Apache::Config, "permissions" do
|
||||
|
||||
it "should allow from somewhere" do
|
||||
apache.allow_from '1.2.3.4'
|
||||
apache.to_a.should == [ 'Allow from 1.2.3.4' ]
|
||||
apache.to_a.should == [ 'Allow from "1.2.3.4"' ]
|
||||
end
|
||||
|
||||
# Verify the blob output in apache itself, just make sure the method doesn't bomb
|
||||
|
@ -72,19 +72,19 @@ end
|
||||
describe Apache::RewriteRule, "a RewriteRule" do
|
||||
subject do
|
||||
rule = Apache::RewriteRule.new
|
||||
rule.cond('%{REQUEST_FILENAME}', '^/test$')
|
||||
rule.rule(%r{^/$}, '/test', :last => true, :preserve_query_string => true)
|
||||
rule.cond('/%{REQUEST_FILENAME}', '^/test$')
|
||||
rule.rule(%r{^/test$}, '/test2', :last => true, :preserve_query_string => true)
|
||||
rule
|
||||
end
|
||||
|
||||
its(:to_s) { should == 'RewriteRule "^/$" "/test" [L,QSA]' }
|
||||
its(:to_s) { should == 'RewriteRule "^/test$" "/test2" [L,QSA]' }
|
||||
its(:to_a) { should == [
|
||||
'RewriteCond "%{REQUEST_FILENAME}" "^/test$"',
|
||||
'RewriteRule "^/$" "/test" [L,QSA]'
|
||||
'RewriteCond "/%{REQUEST_FILENAME}" "^/test$"',
|
||||
'RewriteRule "^/test$" "/test2" [L,QSA]'
|
||||
] }
|
||||
|
||||
it "should pass the test" do
|
||||
subject.test('/').should == '/test'
|
||||
it "should not the test" do
|
||||
subject.test('/test', :request_filename => 'test').should == '/test2'
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user