diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2013-09-05 10:00:17 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-09-05 13:34:53 +0100 |
commit | d97283bf7b22fb00faa4c8b36a6b477192308fdb (patch) | |
tree | 21819b334ae2b466102c98466496f6577f8b6a33 /t/app/controller/rss.t | |
parent | 7ce7a901c8fc53051f656755675bd5e936cb65c0 (diff) |
Use format_datetime for DBIx::Class searches to get rid of warnings when running test suite
Diffstat (limited to 't/app/controller/rss.t')
-rw-r--r-- | t/app/controller/rss.t | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/t/app/controller/rss.t b/t/app/controller/rss.t index f04a17151..ec6a01b50 100644 --- a/t/app/controller/rss.t +++ b/t/app/controller/rss.t @@ -3,6 +3,7 @@ use warnings; use Test::More; use FixMyStreet::TestMech; +use FixMyStreet::App; my $mech = FixMyStreet::TestMech->new; @@ -15,6 +16,8 @@ my $dt = DateTime->new( my $user1 = FixMyStreet::App->model('DB::User') ->find_or_create( { email => 'reporter-rss@example.com', name => 'Reporter User' } ); +my $dt_parser = FixMyStreet::App->model('DB')->schema->storage->datetime_parser; + my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( { postcode => 'eh1 1BB', bodies_str => '2651', @@ -26,9 +29,9 @@ my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( { name => $user1->name, anonymous => 0, state => 'confirmed', - confirmed => $dt, - lastupdate => $dt, - whensent => $dt->clone->add( minutes => 5 ), + confirmed => $dt_parser->format_datetime($dt), + lastupdate => $dt_parser->format_datetime($dt), + whensent => $dt_parser->format_datetime($dt->clone->add( minutes => 5 )), lang => 'en-gb', service => '', cobrand => 'default', |