1 |
dpavlin |
9 |
use warnings; |
2 |
|
|
use strict; |
3 |
|
|
|
4 |
|
|
package Transports::Bootstrap; |
5 |
|
|
use base qw(Jifty::Bootstrap); |
6 |
|
|
|
7 |
|
|
sub run { |
8 |
|
|
my $self = shift; |
9 |
|
|
|
10 |
|
|
my $system_user = Transports::CurrentUser->superuser; |
11 |
|
|
# Try testing a create |
12 |
|
|
my $o = Transports::Model::User->new(current_user => $system_user); |
13 |
|
|
my ($id) = $o->create( |
14 |
|
|
name => 'System administrator', |
15 |
|
|
email => 'admin', |
16 |
|
|
password => 'admin', |
17 |
|
|
); |
18 |
|
|
# And another |
19 |
|
|
$o->create( |
20 |
|
|
name => 'Foo Bar', |
21 |
|
|
email => 'foo.bar@example.com', |
22 |
|
|
password => 'baz123', |
23 |
|
|
); |
24 |
|
|
|
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
|
28 |
|
|
1; |