aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin/bodies.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-11-22 13:04:34 +0000
committerMatthew Somerville <matthew@mysociety.org>2019-11-22 13:11:51 +0000
commit9f855f70a644c79182128b7c5384a460e5c2450d (patch)
treea672d8ddd856a1a73f577389a835647146a3f2e7 /t/app/controller/admin/bodies.t
parent399a38c4636fac6ce4a2eb21053604ba74309a36 (diff)
Replace use of FixMyStreet::App with DB in tests.
Diffstat (limited to 't/app/controller/admin/bodies.t')
-rw-r--r--t/app/controller/admin/bodies.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/app/controller/admin/bodies.t b/t/app/controller/admin/bodies.t
index aaa9bca65..2d09ee85e 100644
--- a/t/app/controller/admin/bodies.t
+++ b/t/app/controller/admin/bodies.t
@@ -142,7 +142,7 @@ subtest 'check open311 configuring' => sub {
$mech->content_contains('Council contacts configured via Open311');
$mech->content_contains('Values updated');
- my $conf = FixMyStreet::App->model('DB::Body')->find( $body->id );
+ my $conf = FixMyStreet::DB->resultset('Body')->find( $body->id );
is $conf->endpoint, 'http://example.com/open311', 'endpoint configured';
is $conf->api_key, 'api key', 'api key configured';
is $conf->jurisdiction, 'mySociety', 'jurisdiction configures';
@@ -162,7 +162,7 @@ subtest 'check open311 configuring' => sub {
$mech->content_contains('Values updated');
- $conf = FixMyStreet::App->model('DB::Body')->find( $body->id );
+ $conf = FixMyStreet::DB->resultset('Body')->find( $body->id );
is $conf->endpoint, 'http://example.org/open311', 'endpoint updated';
is $conf->api_key, 'new api key', 'api key updated';
is $conf->jurisdiction, 'open311', 'jurisdiction configures';
@@ -184,7 +184,7 @@ subtest 'check open311 configuring' => sub {
$mech->content_contains('Values updated');
- $conf = FixMyStreet::App->model('DB::Body')->find( $body->id );
+ $conf = FixMyStreet::DB->resultset('Body')->find( $body->id );
ok $conf->get_extra_metadata('fetch_all_problems'), 'fetch all problems set';
$mech->form_number(3);
@@ -204,7 +204,7 @@ subtest 'check open311 configuring' => sub {
$mech->content_contains('Values updated');
- $conf = FixMyStreet::App->model('DB::Body')->find( $body->id );
+ $conf = FixMyStreet::DB->resultset('Body')->find( $body->id );
ok !$conf->get_extra_metadata('fetch_all_problems'), 'fetch all problems unset';
};