aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/alert_new.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-03-28 10:12:56 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-03-28 10:12:56 +0100
commitb76cfb3889140f1c771c1f98254f724aad3d4297 (patch)
treebb7beada7a603119ea2897f54a6af96814d850e1 /t/app/controller/alert_new.t
parent3f21a9742d89c3e4fda47a0be6ec2a17f802c99a (diff)
parenta8ceae6c99b00aefcba301b2f41033d84701f56a (diff)
Merge branch 'offline-tests'
Diffstat (limited to 't/app/controller/alert_new.t')
-rw-r--r--t/app/controller/alert_new.t22
1 files changed, 11 insertions, 11 deletions
diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t
index 1b85adf7e..ea38f7c25 100644
--- a/t/app/controller/alert_new.t
+++ b/t/app/controller/alert_new.t
@@ -208,7 +208,7 @@ foreach my $test (
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ],
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
}, sub {
$mech->get_ok('/alert/list?pc=EH991SP');
};
@@ -312,7 +312,7 @@ subtest "Test two-tier council alerts" => sub {
) {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ],
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
}, sub {
$mech->get_ok( '/alert/list?pc=GL502PR' );
$mech->submit_form_ok( {
@@ -351,7 +351,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub {
$mech->get_ok( '/alert' );
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ],
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
}, sub {
$mech->submit_form_ok( { with_fields => { pc => 'EH11BB' } } );
$mech->submit_form_ok( {
@@ -371,7 +371,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub {
}
}
- my $dt = DateTime->now()->add( days => 2);
+ my $dt = DateTime->now(time_zone => 'Europe/London')->add(days => 2);
my $dt_parser = FixMyStreet::App->model('DB')->schema->storage->datetime_parser;
@@ -436,7 +436,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub {
ok $update, "created test update - $update_id";
FixMyStreet::override_config {
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
}, sub {
FixMyStreet::App->model('DB::AlertType')->email_alerts();
};
@@ -447,7 +447,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub {
for (@emails) {
my $body = $mech->get_text_body_from_email($_);
$count++ if $body =~ /The following updates have been left on this report:/;
- $count++ if $body =~ /The following new FixMyStreet reports have been added in the City of\s+Edinburgh\s+Council area:/;
+ $count++ if $body =~ /The following new FixMyStreet reports have been added in the Area 2651 area:/;
$count++ if $body =~ /The following FixMyStreet reports have been made within the area you\s+specified:/;
$count++ if $body =~ /\s+-\s+Testing/;
}
@@ -486,7 +486,7 @@ subtest "Test signature template is used from cobrand" => sub {
my $user2 = $mech->create_user_ok('alerts@example.com', name => 'Alert User' );
- my $dt = DateTime->now()->add( days => 2);
+ my $dt = DateTime->now(time_zone => 'Europe/London')->add(days => 2);
my $dt_parser = FixMyStreet::App->model('DB')->schema->storage->datetime_parser;
@@ -542,7 +542,7 @@ subtest "Test signature template is used from cobrand" => sub {
$mech->clear_emails_ok;
FixMyStreet::override_config {
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ],
}, sub {
FixMyStreet::App->model('DB::AlertType')->email_alerts();
@@ -570,7 +570,7 @@ subtest "Test signature template is used from cobrand" => sub {
$mech->clear_emails_ok;
FixMyStreet::override_config {
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ],
}, sub {
FixMyStreet::App->model('DB::AlertType')->email_alerts();
@@ -665,7 +665,7 @@ for my $test (
$mech->clear_emails_ok;
FixMyStreet::override_config {
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
}, sub {
FixMyStreet::App->model('DB::AlertType')->email_alerts();
};
@@ -673,7 +673,7 @@ for my $test (
$report->update( { non_public => 0 } );
FixMyStreet::override_config {
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
}, sub {
FixMyStreet::App->model('DB::AlertType')->email_alerts();
};