summary refs log tree commit diff
path: root/t/10_mx_net_api_test.t
blob: 96bf2bee669518cc9eeac560d200421afed02c45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use strict;
use warnings;
use Test::More;

BEGIN {
    plan skip_all => 'requires Catalyst::Action::REST'
        unless eval { require Catalyst::Action::REST };
}

{

    package catalysttestapi;
    use Moose;
    use MooseX::Net::API::Test;

    test_api_declare 'TestAPI' => (
        catalyst          => 1,
        catalyst_app_name => 'TestApp'
    );

    test_api_method foo => (
        tests => {
            simple => [
                {
                    # pouvoir surcharger
                    test     => 'is_deeply',
                    expected => { status => 1 }
                },
                'ok',
            ]
        }
    );
}

#content_like    => [ { expected => qr/status: 1/ }, ],
#action_ok       => [],
#action_redirect => [],
#action_notfound => [],
#contenttype_is  => [],

catalysttestapi->run();

done_testing;