File Coverage

blib/lib/JMAP/Tester/Result/Upload.pm
Criterion Covered Total %
statement 28 28 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod 4 5 80.0
total 41 42 97.6


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