Group
Extension

Matches 22

Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/test/mojo.t ( view source; MetaCPAN )
test 'content_isnt' => sub {
  $t->content_isnt('Goodbye Test!');
  is_deeply \@args, ['isnt', 'Hello Test!', 'Goodbye Test!', 'no match for content'], 'right result';
  $t->content_isnt('Goodbye Test
!', 'some description');
  is_deeply \@args, ['isnt', 'Hello Test!', 'Goodbye Test!', 'some description'], 'right result';
};

subtest 'content_like' => sub {
  $t->content_like(qr/Hello Test!/);
  is
ype_isnt' => sub {
  $t->content_type_isnt('image/png');
  is_deeply \@args, ['isnt', 'text/html;charset=UTF-8', 'image/png', 'not Content-Type: image/png'], 'right result';
  $t->content_type_isnt('i
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojolicious/app.t ( view source; MetaCPAN )
mePlugin2::register (security violation)
$t->get_ok('/plugin-test-some_plugin2/register')->status_isnt(404)->status_is(500)
  ->header_is(Server => 'Mojolicious (Perl)')->content_unlike(qr/Something/)
 $logs = $t->app->log->capture('trace');
$t->get_ok('/plugin-test-some_plugin2/register')->status_isnt(404)->status_is(500)
  ->header_is(Server => 'Mojolicious (Perl)')->content_unlike(qr/Something/)
t->get_ok($url => {'X-Test' => 'Hi there!'})->status_isnt(404)->status_is(200)->status_is(200, 'with description')
  ->status_isnt(500)->status_isnt(500, 'with description')->header_is('X-Bender' => u
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/user_agent.t ( view source; MetaCPAN )
Mojo::UserAgent::Server->app, app, 'applications are equal');
my $dummy = Mojolicious::Lite->new;
isnt(Mojo::UserAgent->new->server->app($dummy)->app, app, 'applications are not equal');
is(Mojo::User
status';
is $tx->res->headers->content_encoding, 'gzip',        'right "Content-Encoding" value';
isnt $tx->res->body,                    'Hello GZip!', 'different content';

# Keep-alive timeout in b
e';
    is $tx->res->body,           'works!', 'right content';
    isnt $tx->connection,        $last,    'new connection';
    isnt $ua->server->url->port, $port,    'new port';
    my $port2 = $ua-
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/websocket_frames.t ( view source; MetaCPAN )
 set';
is $frame->[4], 1,            'text frame';
is $frame->[5], 'also works', 'right payload';
isnt(build_frame(0, 1, 0, 0, 0, 2, 'also works'), $bytes, 'frames are not equal');

# Masked binary fr
et';
is $frame->[4], 2,            'binary frame';
is $frame->[5], 'just works', 'right payload';
isnt(build_frame(0, 1, 0, 0, 0, 2, 'just works'), $bytes, 'frames are not equal');

# One-character te
0,  'rsv3 flag is not set';
is $frame->[4], 2,  'binary frame';
is $frame->[5], '', 'no payload';
isnt(build_frame(0, 1, 0, 0, 0, 2, ''), $bytes, 'frames are not equal');

# Size limit
$bytes = build_
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojolicious/dispatcher_lite_app.t ( view source; MetaCPAN )
 $t = Test::Mojo->new;

subtest 'Normal route' => sub {
  $t->get_ok('/')->status_is(200)->header_isnt('Cache-Control' => 'max-age=3600, must-revalidate')->content_is('works');
};

subtest 'Normal sta

};

subtest ' Custom response' => sub {
  $t->get_ok('/res.txt?route=1')->status_is(202)->header_isnt('Cache-Control' => 'max-age=3600, must-revalidate')
    ->content_is('Custom response!');
};

sub
st 'Conditional response' => sub {
  $t->get_ok('/res.txt?route=1&res=1')->status_is(201)->header_isnt('Cache-Control' => 'max-age=3600, must-revalidate')
    ->content_is('Conditional response!');
};
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/user_agent_socks.t ( view source; MetaCPAN )
oxy-Authorization" value';
  is $tx->res->body,                         $last, 'right content';
  isnt(Mojo::IOLoop->stream($tx->connection)->handle->sockport, $last, 'different ports');

  my $before
 status';
  is $tx->res->body, $last, 'right content';
  is $before,        $last, 'same port';
  isnt(Mojo::IOLoop->stream($tx->connection)->handle->sockport, $last, 'different ports');
};

subtest '
      $tx->send('test');
    }
  );
  Mojo::IOLoop->start;
  is $result, $last, 'right result';
  isnt(Mojo::IOLoop->stream($id)->handle->sockport, $last, 'different ports');
};

subtest 'HTTPS reques
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojolicious/websocket_lite_app.t ( view source; MetaCPAN )
age_ok->message_is({binary => 'bytes!'})
    ->send_ok({binary => 'bytes!'})->message_ok->message_isnt({text => 'bytes!'})->finish_ok;
};

subtest 'Bytes in multiple frames' => sub {
  $t->websocket_o
   ->message_is('[1,2,3,4]')->message_is('[1,2,3,4]', 'with description')->message_isnt('[1,2,3]')
    ->message_isnt('[1,2,3]', 'with description')->message_like(qr/3/)->message_like(qr/3/, 'with des
inish_ok;
  $t->websocket_ok('/push')->message_ok->message_unlike(qr/shift/)->message_ok->message_isnt('shift')
    ->message_ok->message_like(qr/us/)->message_ok->message_unlike({binary => qr/push/})
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojolicious/production_app.t ( view source; MetaCPAN )
                       'mojolicious_test',                 'right moniker';

# Remove extra files
isnt $t->app->static->file('mojo/jquery/jquery.js'), undef, 'found jQuery';
delete $t->app->static->ex
mePlugin2::register (security violation)
$t->get_ok('/plugin-test-some_plugin2/register')->status_isnt(404)->status_is(500)
  ->header_is(Server => 'Mojolicious (Perl)')->content_like(qr/Not developme
in2::register (security violation again)
$t->get_ok('/plugin-test-some_plugin2/register')->status_isnt(404)->status_is(500)
  ->header_is(Server => 'Mojolicious (Perl)')->content_like(qr/Not developme
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/file.t ( view source; MetaCPAN )
ed' unless eval { symlink $orig, $link };
  is $link->stat->size,    0, 'target file is empty';
  isnt $link->lstat->size, 0, 'link is not empty';
};

subtest 'list/list_tree' => sub {
  is_deeply pat
e $future, $future, $file->to_string;
  is $file->stat->mtime,          $future, 'right mtime';
  isnt $file->touch->stat->mtime, $future, 'different mtime';
};

subtest 'Dangerous paths' => sub {
  e
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/bytestream.t ( view source; MetaCPAN )
 content';
};

subtest 'clone' => sub {
  my $stream = b('foo');
  my $clone  = $stream->clone;
  isnt $stream->b64_encode->to_string, 'foo', 'original changed';
  is $clone->to_string,               
' => sub {
  my $uncompressed = b('a' x 1000);
  my $compressed   = $uncompressed->clone->gzip;
  isnt $compressed->to_string, $uncompressed->to_string, 'bytestream changed';
  ok $compressed->size < 
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/promise.t ( view source; MetaCPAN )
olve($promise)), refaddr($promise), 'same object';

  $promise = Mojo::Promise->resolve('foo');
  isnt refaddr(Mojo::Promise->new->resolve($promise)), refaddr($promise), 'different object';

  $promis
w->ioloop($loop)->resolve }, 1);
  is $promise->ioloop,   $loop,                   'same loop';
  isnt $promise->ioloop, Mojo::IOLoop->singleton, 'not the singleton';
  $promise->then(sub { $ok = 1; $
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojolicious/lite_app.t ( view source; MetaCPAN )
s(Location => undef)
  ->element_exists('#☃')->element_exists_not('#foo')->text_isnt('#foo' => 'whatever')->text_isnt('div#☃' => 'Redirect')
  ->text_is('div#☃' => 'Redirect works!')->text_unlik
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/util.t ( view source; MetaCPAN )
gzip/gunzip' => sub {
  my $uncompressed = 'a' x 1000;
  my $compressed   = gzip $uncompressed;
  isnt $compressed, $uncompressed, 'string changed';
  ok length $compressed < length $uncompressed, 'st
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojolicious/renderer.t ( view source; MetaCPAN )
 $c->res->headers->content_encoding, 'gzip',                    'right "Content-Encoding" value';
isnt $c->res->body,                    $output,                   'different string';
is gunzip($c->re
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/parameters.t ( view source; MetaCPAN )
$clone  = $params->clone;
  is "$params", "$clone", 'equal parameters';
  push @$clone, c => 9;
  isnt "$params", "$clone", 'unequal parameters';
};

subtest 'Merge' => sub {
  my $params  = Mojo::Par
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/collection.t ( view source; MetaCPAN )
m     = $collection->shuffle;
  is $collection->size, $random->size, 'same number of elements';
  isnt "@$collection",  "@$random",    'different order';
  is_deeply c()->shuffle->to_array, [], 'no el
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/request.t ( view source; MetaCPAN )
 $id2 = Mojo::Message::Request->new->request_id;
  ok length $id >= 8, 'at least 8 characters';
  isnt $id, $id2, 'different id';
};

subtest 'Parse HTTP 1.1 message with huge "Cookie" header exceedin
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/morbo.t ( view source; MetaCPAN )
$script], 'file has changed';
  ok((stat $script)[9] == $mtime, 'modify time has not changed');
  isnt((stat $script)[7], $size, 'size has changed');
  sleep 0.1 until -f $started;

  # Application ha
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojolicious/commands.t ( view source; MetaCPAN )
f Mojolicious::Commands->new->run, 'CODE', 'right reference';
  local $ENV{MOJO_NO_DETECT} = 1;
  isnt ref Mojolicious::Commands->new->run, 'CODE', 'not a CODE reference';
}

# Run command
is ref Mojo
Mojolicious ( S/SR/SRI/Mojolicious-9.26.tar.gz, SRI, 2022; MetaCPAN )
Mojolicious/t/mojo/asset.t ( view source; MetaCPAN )
le->new;
  $file->add_chunk('bcd');
  my $tmp = Mojo::Asset::File->new;
  $tmp->add_chunk('x');
  isnt $file->path, $tmp->path, 'different paths';
  my $path = $tmp->path;
  ok -e $path, 'file exists'

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.