def test_filters
build_control
filter_list = @control.filters
assert_equal(1, @list_call)
assert_equal('filters', @list_last_name)
assert(filter_list.empty?)
filter_list.push({ 'filter' => 'ERB',
'arguments' => [
1
],
'attach_path' => '/foo',
'attach_mask' => %"\.rhtml?($|/)",
'virtual_host' => nil
})
filter_list.push({ 'filter' => 'SSI',
'arguments' => [
{ 'config' => true,
'include' => true,
'echo' => true,
'fsize' => true,
'flastmod' => true,
'exec' => true
}
],
'attach_path' => '/bar',
'attach_mask' => %"\.shtml?($|/)",
'virtual_host' => 'baz'
})
@control.set_filters(filter_list)
assert_equal(1, @set_list_call)
assert_equal('filters', @set_list_last_name)
assert_equal(2, @properties['filters'].length)
assert_equal({ 'filter' => 'ERB',
'arguments' => [
1
],
'attach_path' => '/foo',
'attach_mask' => %"\.rhtml?($|/)",
'virtual_host' => nil
}, @properties['filters'][0])
assert_equal({ 'filter' => 'SSI',
'arguments' => [
{ 'config' => true,
'include' => true,
'echo' => true,
'fsize' => true,
'flastmod' => true,
'exec' => true
}
],
'attach_path' => '/bar',
'attach_mask' => %"\.shtml?($|/)",
'virtual_host' => 'baz'
}, @properties['filters'][1])
end