Skip to content

elcamlost/Test2-MojoX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test2::MojoX Build Status Coverage Status

Testing Mojo with Test2

use Test2::V0;
use Test2::MojoX;
use Mojolicious::Lite -signatures;
get '/' => sub {
  shift->render(
    json => {
      scalar => 'value',
      array  => [qw/item1 item2/],
      hash   => {key1 => 'value1', key2 => 'value2'}
    }
  );
};

my $t = Test2::MojoX->new;
$t->get_ok('/')->json_is(hash {
  field scalar => 'value';
  field array  => array {
    item 'item1';
    item 'item2';
    end;
  };
  field hash => hash {
    field key1 => 'value1';
    field key2 => 'value2';
    end;
  };
  end;
});

Installation

Module available at CPAN. So you can install with your favourite cpan installer, such as cpan, carton, carmel etc.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages