def test_document
@DocumentTable.document = {
'document' => 'Page',
'arguments' => [
"Hello world.\n",
'text/plain'
],
'mount_path' => '/hello',
'mount_mask' => nil,
'virtual_host' => 'foo',
'comment' => 'test of Page',
'show_args' => true
}
assert_equal('Page', @DocumentTable.doc_name)
assert_equal(1, @doc_tag_call)
assert_equal('/hello', @DocumentTable.doc_path)
assert_equal(1, @path_tag_call)
assert_nil(@DocumentTable.doc_mask)
assert_equal(1, @mask_tag_call)
assert_equal('foo', @DocumentTable.virtual_host)
assert_equal('test of Page', @DocumentTable.comment)
assert_equal(true, @DocumentTable.show_args?)
assert_equal([ [ 'content', "Hello world.\n" ],
[ 'content-type', 'text/plain' ]
], @DocumentTable.doc_arg_alist)
assert_equal(1, @doc_args_call)
assert_equal('Page', @doc_args_last_doc_name)
end