Akron | 3cd391e | 2017-03-29 23:42:54 +0200 | [diff] [blame^] | 1 | use Mojo::Base -strict; |
2 | use lib; | ||||
3 | use Test::More; | ||||
4 | use Test::Mojo; | ||||
5 | use Data::Dumper; | ||||
6 | |||||
7 | $ENV{MOJO_USERAGENT_DEBUG} = 1; | ||||
8 | |||||
9 | my $t = Test::Mojo->new('Kalamar'); | ||||
10 | |||||
11 | my $c = $t->app->build_controller; | ||||
12 | |||||
13 | # Login with user credentials | ||||
14 | ok($c->user->login('test_h', 'p278h'), 'Login with demo user'); | ||||
15 | is($c->stash('user'), 'test_h', 'Kustvakt is logged in'); | ||||
16 | like($c->stash('auth'), qr/^api_token /, 'Kustvakt is logged in'); | ||||
17 | |||||
18 | done_testing; | ||||
19 | __END__ |