NAME

App::Dochazka::REST::Test - Test helper functions

VERSION

Version 0.135

DESCRIPTION

This module provides helper code for unit tests.

EXPORTS

FUNCTIONS

req_root

Construct an HTTP request as 'root' (admin priv)

req_demo

Construct an HTTP request as 'demo' (passerby priv)

req_json

Construct an HTTP request for JSON as 'demo' (passerby priv)

req_html

Construct an HTTP request for HTML as 'demo' (passerby priv)

req_bad_creds

Construct an HTTP request with improper credentials

status_from_json

Given a JSON string, check if it is valid JSON, blindly convert it into a Perl hashref, bless it into 'App::CELL::Status', and send it back to caller.