'A request for a path which is a directory but does not have a trailing
slash will be redirected to a URL which does have a slash by L{File}.'

def test_directoryWithoutTrailingSlashRedirects(self):

    base = FilePath(self.mktemp())
    base.makedirs()
    base.child('folder').makedirs()
    file = static.File(base.path)
    request = DummyRequest(['folder'])
    request.uri = 'http://dummy/folder#baz?foo=bar'
    child = resource.getChildForRequest(file, request)
    self.successResultOf(self._render(child, request))
    self.assertEqual(request.responseCode, FOUND)
    self.assertEqual(request.responseHeaders.getRawHeaders('location'), ['http://dummy/folder/#baz?foo=bar'])
