API Reference mutare_plug v#0.1.0

Copy Markdown View Source

Modules

Custom Mutare mutators for the Plug request surface — the Plug.Conn calls a plug, router, or controller action performs on the conn.

:resp_body — blanks the response body: the body argument of Plug.Conn.send_resp/3 and Plug.Conn.resp/3 becomes "". A surviving mutant means no test reads the response body — the response was sent, with the right status, and nothing checked what it said.

:resp_cookie — removes response-cookie mutations, flips explicit :same_site cookie policy values, and drops explicit :max_age options. A survivor means no test depends on this code setting/deleting the response cookie, on the cookie's SameSite policy, or on its persistence.

:plug_halt — removes Plug.Conn.halt/1. A plug that fails to halt lets the request flow on to the action it meant to block, so a surviving :plug_halt mutant means no test depends on this plug halting.

:resp_header — removes explicit response-header mutations. A surviving mutant means no test depends on this code setting or deleting that response header.

:plug_session — removes Plug.Conn session mutations. A surviving mutant means no test depends on this code writing, deleting, clearing, or reconfiguring session state.

:http_status — swaps the atom status of Plug.Conn.put_status/2, send_resp/3, resp/3, send_chunked/2, and send_file/3,4,5 for a plausible sibling in the same status family. A surviving mutant means no test pins the exact status code.