Page
Library
Module
Module type
Parameter
Class
Class type
Source
Opium_testing
SourceThis module provides helpers to easily test Opium applications with Alcotest.
Testable
handle_request
handle_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_status
check_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_meth
check_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_version
check_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 ->
unit
check_version' ?msg t1 t2
checks that the version t1
and t2
are equal.
This is a labeled variant of check_version
check_body
check_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_request
check_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 ->
unit
check_request' ?msg t1 t2
checks that the request t1
and t2
are equal.
This is a labeled variant of check_request
check_response
check_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 ->
unit
check_response' ?msg t1 t2
checks that the response t1
and t2
are equal.
This is a labeled variant of check_response
check_cookie
check_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_contains
check_body_contains ?msg s t
checks that the body t
contains the string s
.