File Coverage

blib/lib/JMAP/Tester/Result/Upload.pm
Criterion Covered Total %
statement 11 16 68.7
branch n/a
condition n/a
subroutine 4 9 44.4
pod 4 5 80.0
total 19 30 63.3


line stmt bran cond sub pod time code
1 1     1   10 use v5.10.0;
  1         3  
2 1     1   5 use strict;
  1         2  
  1         28  
3              
4             package JMAP::Tester::Result::Upload 0.102;
5             # ABSTRACT: what you get when you upload a blob
6              
7 1     1   4 use Moo;
  1         1  
  1         4  
8             with 'JMAP::Tester::Role::HTTPResult';
9              
10 1     1   315 use namespace::clean;
  1         1  
  1         5  
11              
12             #pod =head1 OVERVIEW
13             #pod
14             #pod This is what you get when you upload! It's got an C method. It
15             #pod returns true. It also has:
16             #pod
17             #pod =method blob_id
18             #pod
19             #pod The blobId of the blob from the JMAP server.
20             #pod
21             #pod =method blobId
22             #pod
23             #pod An alias for C above.
24             #pod
25             #pod =method type
26             #pod
27             #pod The media type of the file (as specified in RFC6838, section 4.2) as
28             #pod set in the Content-Type header of the upload HTTP request.
29             #pod
30             #pod =method size
31             #pod
32             #pod The size of the file in octets.
33             #pod
34             #pod =cut
35              
36 0     0 0   sub is_success { 1 }
37              
38             has payload => (
39             is => 'ro',
40             );
41              
42 0     0 1   sub blob_id { $_[0]->payload->{blobId} }
43 0     0 1   sub blobId { $_[0]->payload->{blobId} }
44 0     0 1   sub type { $_[0]->payload->{type} }
45 0     0 1   sub size { $_[0]->payload->{size} }
46              
47             1;
48              
49             __END__