aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/admin.t18
-rw-r--r--t/app/controller/dashboard.t3
-rw-r--r--t/app/controller/reports.t2
3 files changed, 10 insertions, 13 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index 4384123bd..db7f9fc3c 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -157,13 +157,13 @@ subtest 'check contact creation' => sub {
email => 'test@example.com',
note => 'test note',
non_public => undef,
- confirmed => 0,
+ state => 'unconfirmed',
} } );
$mech->content_contains( 'test category' );
$mech->content_contains( 'test@example.com' );
$mech->content_contains( '<td>test note' );
- $mech->content_contains( 'Private:&nbsp;No' );
+ $mech->content_like( qr/<td>\s*unconfirmed\s*<\/td>/ ); # No private
$mech->submit_form_ok( { with_fields => {
category => 'private category',
@@ -173,7 +173,7 @@ subtest 'check contact creation' => sub {
} } );
$mech->content_contains( 'private category' );
- $mech->content_contains( 'Private:&nbsp;Yes' );
+ $mech->content_like( qr{test\@example.com\s*</td>\s*<td>\s*confirmed\s*<br>\s*<small>\s*Private\s*</small>\s*</td>} );
$mech->submit_form_ok( { with_fields => {
category => 'test/category',
@@ -195,9 +195,8 @@ subtest 'check contact editing' => sub {
} } );
$mech->content_contains( 'test category' );
- $mech->content_contains( 'test2@example.com' );
+ $mech->content_like( qr{test2\@example.com\s*</td>\s*<td>\s*unconfirmed\s*</td>} );
$mech->content_contains( '<td>test2 note' );
- $mech->content_contains( 'Private:&nbsp;No' );
$mech->get_ok('/admin/body/' . $body->id . '/test%20category');
$mech->submit_form_ok( { with_fields => {
@@ -210,14 +209,13 @@ subtest 'check contact editing' => sub {
$mech->get_ok('/admin/body/' . $body->id . '/test%20category');
$mech->content_contains( '<td><strong>test2@example.com,test3@example.com' );
- $mech->get_ok('/admin/body/' . $body->id . '/test%20category');
$mech->submit_form_ok( { with_fields => {
email => 'test2@example.com',
note => 'test2 note',
non_public => 'on',
} } );
- $mech->content_contains( 'Private:&nbsp;Yes' );
+ $mech->content_like( qr{test2\@example.com\s*</td>\s*<td>\s*unconfirmed\s*<br>\s*<small>\s*Private\s*</small>\s*</td>} );
$mech->get_ok('/admin/body/' . $body->id . '/test%20category');
$mech->content_contains( '<td><strong>test2@example.com' );
@@ -225,7 +223,7 @@ subtest 'check contact editing' => sub {
subtest 'check contact updating' => sub {
$mech->get_ok('/admin/body/' . $body->id . '/test%20category');
- $mech->content_like(qr{test2\@example.com</strong>[^<]*</td>[^<]*<td>No}s);
+ $mech->content_like(qr{test2\@example.com</strong>[^<]*</td>[^<]*<td>unconfirmed}s);
$mech->get_ok('/admin/body/' . $body->id);
@@ -233,9 +231,9 @@ subtest 'check contact updating' => sub {
$mech->tick( 'confirmed', 'test category' );
$mech->submit_form_ok({form_number => 1});
- $mech->content_like(qr'test2@example.com</td>[^<]*<td>\s*Confirmed:&nbsp;Yes's);
+ $mech->content_like(qr'test2@example.com</td>[^<]*<td>\s*confirmed's);
$mech->get_ok('/admin/body/' . $body->id . '/test%20category');
- $mech->content_like(qr{test2\@example.com[^<]*</td>[^<]*<td><strong>Yes}s);
+ $mech->content_like(qr{test2\@example.com[^<]*</td>[^<]*<td><strong>confirmed}s);
};
$body->update({ send_method => undef });
diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t
index 9713d2d2c..9d424c1ae 100644
--- a/t/app/controller/dashboard.t
+++ b/t/app/controller/dashboard.t
@@ -59,9 +59,8 @@ FixMyStreet::override_config {
body_id => $body->id,
category => $contact,
email => "$contact\@example.org",
- confirmed => 1,
+ state => 'confirmed',
whenedited => DateTime->now,
- deleted => 0,
editor => 'test',
note => 'test',
}
diff --git a/t/app/controller/reports.t b/t/app/controller/reports.t
index 209266940..159095853 100644
--- a/t/app/controller/reports.t
+++ b/t/app/controller/reports.t
@@ -213,7 +213,7 @@ subtest "test greenwich all reports page" => sub {
body_id => $body->id,
category => 'Deleted',
email => 'deleted@example.com',
- deleted => 1
+ state => 'deleted',
);
ok $mech->host("greenwich.fixmystreet.com"), 'change host to greenwich';
$mech->get_ok('/reports/Royal+Borough+of+Greenwich');