Page
Library
Module
Module type
Parameter
Class
Class type
Source
Opium_testingSourceThis module provides helpers to easily test Opium applications with Alcotest.
Testablehandle_requesthandle_request app request response processes a request request with the given Opium application app.
It processes the request the same Opium.Server_connection.run would and returns the generated response.
check_statuscheck_status ?msg t1 t2 checks that the status t1 and t2 are equal.
check_status'check_status' ?msg t1 t2 checks that the status t1 and t2 are equal.
This is a labeled variant of check_status
check_methcheck_meth ?msg t1 t2 checks that the method t1 and t2 are equal.
check_meth'check_meth' ?msg t1 t2 checks that the method t1 and t2 are equal.
This is a labeled variant of check_meth
check_versioncheck_version ?msg t1 t2 checks that the version t1 and t2 are equal.
check_version'val check_version' :
?msg:string ->
expected:Opium.Version.t ->
actual:Opium.Version.t ->
unitcheck_version' ?msg t1 t2 checks that the version t1 and t2 are equal.
This is a labeled variant of check_version
check_bodycheck_body ?msg t1 t2 checks that the body t1 and t2 are equal.
check_body'check_body' ?msg t1 t2 checks that the body t1 and t2 are equal.
This is a labeled variant of check_body
check_requestcheck_request ?msg t1 t2 checks that the request t1 and t2 are equal.
check_request'val check_request' :
?msg:string ->
expected:Opium.Request.t ->
actual:Opium.Request.t ->
unitcheck_request' ?msg t1 t2 checks that the request t1 and t2 are equal.
This is a labeled variant of check_request
check_responsecheck_response ?msg t1 t2 checks that the response t1 and t2 are equal.
check_response'val check_response' :
?msg:string ->
expected:Opium.Response.t ->
actual:Opium.Response.t ->
unitcheck_response' ?msg t1 t2 checks that the response t1 and t2 are equal.
This is a labeled variant of check_response
check_cookiecheck_cookie ?msg t1 t2 checks that the cookie t1 and t2 are equal.
check_cookie'check_cookie' ?msg t1 t2 checks that the cookie t1 and t2 are equal.
This is a labeled variant of check_cookie
check_body_containscheck_body_contains ?msg s t checks that the body t contains the string s.