line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CatalystX::Eta::Test::REST; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
64339
|
use base qw(Stash::REST); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1674
|
|
4
|
2
|
|
|
2
|
|
159810
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
81
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
CatalystX::Eta::Test::REST->add_trigger( 'process_response' => \&on_process_response ); |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
15
|
use Test::More; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
31
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub on_process_response { |
11
|
16
|
|
|
16
|
0
|
431325
|
my ( $self, $opt ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
16
|
|
|
|
|
55
|
my $req = $opt->{req}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $desc = join ' ', $req->method, $req->uri->path, |
16
|
16
|
100
|
|
|
|
114
|
'-> ' . $opt->{conf}->{code} . ( $opt->{conf}{is_fail} ? ' is fail' : '' ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
is( |
19
|
|
|
|
|
|
|
$opt->{res}->code, |
20
|
|
|
|
|
|
|
$opt->{conf}->{code}, |
21
|
16
|
100
|
|
|
|
618
|
$desc . ( exists $opt->{conf}->{name} ? ' - ' . $opt->{conf}->{name} : '' ) |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
16
|
50
|
|
|
|
10651
|
if ( $opt->{res}->code != $opt->{conf}->{code} ) { |
25
|
0
|
|
|
|
|
|
eval('use DDP; my $x= $opt->{res}; p $x '); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |