# NAME
Test::Mojo::Role::TestDeep - Add Test::Deep methods to Test::Mojo::WithRoles
# VERSION
version 0.004
# STATUS
# SYNOPSIS
use Test::Deep;
use Test::Mojo::WithRoles 'TestDeep';
my $t = Test::Mojo::WithRoles->new( 'MyApp' );
$t->get_ok( '/data.json' )
->json_deeply(
superhashof( { foo => 'bar' } ),
'has at least a foo key with "bar" value',
);
# DESCRIPTION
This module adds some [Test::Deep](https://metacpan.org/pod/Test::Deep) functionality to [Test::Mojo](https://metacpan.org/pod/Test::Mojo). `Test::Deep`
allows for extremely-customizable testing of data structures.
# METHODS
## json\_deeply
$t->cmp_deeply( $expect, $desc )
$t->cmp_deeply( $ptr, $expect, $desc )
Test that the current response (parsed as a JSON object) matches the given
tests. `$expect` is a data structure containing [Test::Deep
comparisons](https://metacpan.org/pod/Test::Deep#SPECIAL-COMPARISONS-PROVIDED) to run. `$desc` is a
description of the test.
If given, `$ptr` is a JSON pointer string to pick out a single part of the
data structure. This is more convenient than using Test::Deep's comparison
routines to do the same thing. See [Mojo::JSON::Pointer](https://metacpan.org/pod/Mojo::JSON::Pointer).
Corresponds to [cmp\_deeply in Test::Deep](https://metacpan.org/pod/Test::Deep#COMPARISON-FUNCTIONS).
# SEE ALSO
- [Test::Deep](https://metacpan.org/pod/Test::Deep)
- [Test::Mojo](https://metacpan.org/pod/Test::Mojo)
- [Test::Mojo::WithRoles](https://metacpan.org/pod/Test::Mojo::WithRoles)
# AUTHOR
Doug Bell
# COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Doug Bell.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.