aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-05-03 10:47:33 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-05-03 10:47:33 +0100
commit654fb3942a04e53c09d7cf516c7bf6a3523d5557 (patch)
tree7149163310cd3da46c01ed67eb6e969307abb452 /t/app/controller/admin
parent26d2bb9dddb0f9e10267ec47dbcb4a1571021a8b (diff)
parent5c06c6c6894a9094a8c60324ac000214964f5da8 (diff)
Merge branch 'moderation-dst-time'
Diffstat (limited to 't/app/controller/admin')
-rw-r--r--t/app/controller/admin/reportextrafields.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/app/controller/admin/reportextrafields.t b/t/app/controller/admin/reportextrafields.t
index 4549eeadf..e02df864f 100644
--- a/t/app/controller/admin/reportextrafields.t
+++ b/t/app/controller/admin/reportextrafields.t
@@ -151,9 +151,11 @@ FixMyStreet::override_config {
subtest 'Create and update new ReportExtraFields' => sub {
my $extra_fields = [];
- my $model = FixMyStreet::App->model('DB::ReportExtraFields');
+ my $model = FixMyStreet::App->model('DB::ReportExtraField');
is $model->count, 0, 'no ReportExtraFields yet';
+ $mech->get_ok("/admin/reportextrafields");
+
$mech->get_ok("/admin/reportextrafields/new");
$mech->submit_form_ok({ with_fields => {
name => "Test extra fields",
@@ -289,7 +291,7 @@ FixMyStreet::override_config {
LANGUAGES => [ 'en-gb,English,en_GB' ]
}, sub {
subtest "Extra fields are missing from cobrand that doesn't allow them" => sub {
- my $object = FixMyStreet::App->model('DB::ReportExtraFields')->first;
+ my $object = FixMyStreet::App->model('DB::ReportExtraField')->first;
$object->update({ language => "", cobrand => ""});
$mech->get_ok("/report/new?longitude=-1.351488&latitude=51.847235&category=" . $contact->category);
@@ -298,7 +300,7 @@ FixMyStreet::override_config {
};
};
-FixMyStreet::App->model('DB::ReportExtraFields')->delete_all;
+FixMyStreet::App->model('DB::ReportExtraField')->delete_all;
$mech->log_out_ok;
subtest 'Reports are created with correct extra metadata' => sub {
@@ -306,7 +308,7 @@ subtest 'Reports are created with correct extra metadata' => sub {
ALLOWED_COBRANDS => [ 'tester' ],
MAPIT_URL => 'http://mapit.uk/',
}, sub {
- my $model = FixMyStreet::App->model('DB::ReportExtraFields');
+ my $model = FixMyStreet::App->model('DB::ReportExtraField');
my $extra_fields = $model->find_or_create({
name => "Test extra fields",
language => "",