Needed to initialise a leaderboard for monthly stats
This commit is contained in:
Tom Bloor 2017-07-20 16:41:35 +01:00
parent 16abfe34ea
commit 5713f03cf2

View file

@ -44,6 +44,8 @@ my $session_key = $framework->login({
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 } )
->status_is(200)
->json_is('/success', Mojo::JSON->true)