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 2     2   20 use v5.20.0;
  2         5  
2              
3             package JMAP::Tester::Result::Upload 0.110;
4             # ABSTRACT: what you get when you upload a blob
5              
6 2     2   6 use Moo;
  2         4  
  2         8  
7             with 'JMAP::Tester::Role::HTTPResult';
8              
9 2     2   670 use experimental 'signatures';
  2         4  
  2         8  
10              
11 2     2   208 use namespace::clean;
  2         3  
  2         8  
12              
13             #pod =head1 OVERVIEW
14             #pod
15             #pod A JMAP::Tester::Result::Upload object represents the successful upload of a
16             #pod JMAP blob. It is a successful L, meaning it
17             #pod has a C method that returns an L object.
18             #pod
19             #pod =method blob_id
20             #pod
21             #pod The blobId of the blob from the JMAP server.
22             #pod
23             #pod =method blobId
24             #pod
25             #pod An alias for C above.
26             #pod
27             #pod =method type
28             #pod
29             #pod The media type of the file (as specified in RFC6838, section 4.2) as set in the
30             #pod Content-Type header of the upload HTTP request.
31             #pod
32             #pod =method size
33             #pod
34             #pod The size of the file in octets.
35             #pod
36             #pod =cut
37              
38 1     1 0 561 sub is_success { 1 }
39              
40             has payload => (
41             is => 'ro',
42             );
43              
44 1     1 1 3 sub blob_id ($self) { $self->payload->{blobId} }
  1         3  
  1         2  
  1         9  
45 1     1 1 4 sub blobId ($self) { $self->payload->{blobId} }
  1         2  
  1         2  
  1         8  
46 1     1 1 2 sub type ($self) { $self->payload->{type} }
  1         3  
  1         2  
  1         7  
47 1     1 1 4 sub size ($self) { $self->payload->{size} }
  1         2  
  1         3  
  1         8  
48              
49             1;
50              
51             __END__