blib/lib/auto/share/dist/Beekeeper/chat/lib/MyApp/Service/Auth.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 32 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
client
2.0
login
2.0
CRAP 2.0
1 package MyApp::Service::Auth;
2  
3 use strict;
4 use warnings;
5  
6 use Beekeeper::Client;
7  
8  
9 sub new {
10 my $class = shift;
11 bless {}, $class;
12 }
13  
14 sub client {
15 my $proto = shift;
16  
17 Beekeeper::Client->instance;
18 }
19  
20  
21 # This is the API of service MyApp::Service::Auth
22  
23 sub login {
24 my ($self, %args) = @_;
25  
26 $self->client->call_remote(
27 method => 'myapp.auth.login',
28 params => {
29 username => $args{'username'},
30 password => $args{'password'},
31 },
32 );
33 }
34  
35 sub logout {
36 my ($self) = @_;
37  
38 $self->client->call_remote(
39 method => 'myapp.auth.logout',
40 );
41 }
42  
43 sub kick {
44 my ($self, %args) = @_;
45  
46 $self->client->call_remote(
47 method => 'myapp.auth.kick',
48 params => {
49 username => $args{'username'},
50 },
51 );
52 }
53  
54 1;