Catalyst-Controller-ElasticSearch
view release on metacpan or search on metacpan
t/lib/MyTest.pm view on Meta::CPAN
#
package MyTest;
use Plack::Test;
use Test::More;
use HTTP::Request::Common;
use JSON;
use base 'Exporter';
our @EXPORT = qw(test_json GET POST encode_json);
my $app = require MyApp;
sub POST {
my ($target, %args) = @_;
return HTTP::Request::Common::POST($target, %args, "Content-Type" => "application/json");
}
sub test_json {
my ($req, $json, $msg) = @_;
test_psgi $app, sub {
my $cb = shift;
( run in 0.296 second using v1.01-cache-2.11-cpan-0d8aa00de5b )