MCPcopy Create free account
hub / github.com/cutelyst/cutelyst / testFileNotInForcedDirsOnly

Method testFileNotInForcedDirsOnly

tests/teststaticcompressed.cpp:346–352  ·  view source on GitHub ↗

* @internal * Test for not available file in a directory that is not below a path set to * StaticCompressed::setDirs() and where StaticCompressed::setServeDirsOnly() is set to @c true. */

Source from the content-addressed store, hash-verified

344 * StaticCompressed::setDirs() and where StaticCompressed::setServeDirsOnly() is set to @c true.
345 */
346void TestStaticCompressed::testFileNotInForcedDirsOnly()
347{
348 QDir dataDir(m_dataDir.path());
349 QVERIFY(dataDir.mkpath(u"forced"_s));
350 const auto resp = getForcedFile(u"/notinforced.js"_s);
351 QVERIFY(resp.statusCode >= Response::BadRequest);
352}
353
354/**
355 * @internal

Callers

nothing calls this directly

Calls 1

pathMethod · 0.45

Tested by

no test coverage detected