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

Method doTest

tests/testactionrenderview.cpp:167–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void TestActionRenderView::doTest()
168{
169 QFETCH(QByteArray, method);
170 QFETCH(QString, url);
171 QFETCH(int, statusCode);
172 QFETCH(QByteArray, output);
173 QFETCH(QString, contentType);
174
175 QUrl urlAux(url);
176
177 auto result = m_engine->createRequest(
178 method, urlAux.path(), urlAux.query(QUrl::FullyEncoded).toLatin1(), Headers(), nullptr);
179
180 QCOMPARE(result.statusCode, statusCode);
181 QCOMPARE(result.body, output);
182 QCOMPARE(result.headers.header("Content-Type"), contentType.toLatin1());
183}
184
185void TestActionRenderView::testController_data()
186{

Callers

nothing calls this directly

Calls 4

createRequestMethod · 0.80
HeadersFunction · 0.50
pathMethod · 0.45
headerMethod · 0.45

Tested by

no test coverage detected