Fix test
Needed to initialise a leaderboard for monthly stats
This commit is contained in:
parent
16abfe34ea
commit
5713f03cf2
1 changed files with 2 additions and 0 deletions
|
@ -44,6 +44,8 @@ my $session_key = $framework->login({
|
||||||
password => $user->{password},
|
password => $user->{password},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$t->app->schema->resultset('Leaderboard')->create_new( 'monthly_total', DateTime->now->truncate(to => 'month' )->subtract( months => 1) );
|
||||||
|
|
||||||
$t->post_ok('/api/stats' => json => { session_key => $session_key } )
|
$t->post_ok('/api/stats' => json => { session_key => $session_key } )
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
->json_is('/success', Mojo::JSON->true)
|
->json_is('/success', Mojo::JSON->true)
|
||||||
|
|
Reference in a new issue