diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-09-25 22:35:39 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-12-02 17:41:35 +0000 |
commit | 55412b79394ff1b1cabe368aed67fa8f68680ecc (patch) | |
tree | 33657093517818b8ba60f156484ec540f9c4af17 /t/app/sendreport/email.t | |
parent | 0c2a792b154e1b28528db887bbde80b19268b9fe (diff) |
Reduce use of FixMyStreet::App.
Command line scripts don't need a full blown app, just database.
Diffstat (limited to 't/app/sendreport/email.t')
-rw-r--r-- | t/app/sendreport/email.t | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/app/sendreport/email.t b/t/app/sendreport/email.t index 65cd7bfa8..eacc6dcf6 100644 --- a/t/app/sendreport/email.t +++ b/t/app/sendreport/email.t @@ -6,7 +6,7 @@ use warnings; use Test::More; use FixMyStreet; -use FixMyStreet::App; +use FixMyStreet::DB; use FixMyStreet::SendReport::Email; use FixMyStreet::TestMech; use mySociety::Locale; @@ -17,7 +17,7 @@ my $e = FixMyStreet::SendReport::Email->new(); # area id 1000 my $params = { id => 1000, name => 'Council of the Thousand' }; -my $body = FixMyStreet::App->model('DB::Body')->find_or_create($params); +my $body = FixMyStreet::DB->resultset('Body')->find_or_create($params); ok $body, "found/created body"; my $contact = $mech->create_contact_ok( @@ -27,7 +27,7 @@ my $contact = $mech->create_contact_ok( note => '', ); -my $row = FixMyStreet::App->model('DB::Problem')->new( { +my $row = FixMyStreet::DB->resultset('Problem')->new( { bodies_str => '1000', category => 'category', cobrand => '', |