aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/app/controller/admin.t13
-rw-r--r--t/app/controller/questionnaire.t2
-rw-r--r--t/app/controller/report_interest_count.t2
-rw-r--r--t/app/controller/report_new.t2
4 files changed, 12 insertions, 7 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index e369968b4..bf7a9ed70 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -144,17 +144,18 @@ subtest 'check summary counts' => sub {
};
FixMyStreet::App->model('DB::Problem')->search( { bodies_str => 1 } )->update( { bodies_str => 2489 } );
- ok $mech->host('fixmystreet.com');
+ ok $mech->host('www.fixmystreet.com');
};
-my $body = $mech->create_body_ok(2650, 'Aberdeen City Council');
+# This override is wrapped around ALL the /admin/body tests
FixMyStreet::override_config {
MAPIT_URL => 'http://mapit.mysociety.org/',
MAPIT_TYPES => [ 'UTA' ],
BASE_URL => 'http://www.example.org',
}, sub {
- $mech->get_ok('/admin/body/2650');
-};
+
+my $body = $mech->create_body_ok(2650, 'Aberdeen City Council');
+$mech->get_ok('/admin/body/2650');
$mech->content_contains('Aberdeen City Council');
$mech->content_like(qr{AB\d\d});
$mech->content_contains("http://www.example.org/around");
@@ -298,6 +299,10 @@ subtest 'check text output' => sub {
$mech->content_contains('test category');
};
+
+}; # END of override wrap
+
+
my $log_entries = FixMyStreet::App->model('DB::AdminLog')->search(
{
object_type => 'problem',
diff --git a/t/app/controller/questionnaire.t b/t/app/controller/questionnaire.t
index 6ee7ba58f..fb9e28859 100644
--- a/t/app/controller/questionnaire.t
+++ b/t/app/controller/questionnaire.t
@@ -419,7 +419,7 @@ FixMyStreet::override_config {
}
);
ok $questionnaire2, 'added another questionnaire';
- ok $mech->host("fixmystreet.com"), 'change host to fixmystreet';
+ ok $mech->host("www.fixmystreet.com"), 'change host to fixmystreet';
$mech->get_ok("/Q/" . $token);
$mech->title_like( qr/Questionnaire/ );
$mech->content_contains( 'Has this problem been fixed?' );
diff --git a/t/app/controller/report_interest_count.t b/t/app/controller/report_interest_count.t
index 3de931c74..9ca05e81b 100644
--- a/t/app/controller/report_interest_count.t
+++ b/t/app/controller/report_interest_count.t
@@ -120,7 +120,7 @@ FixMyStreet::override_config {
};
subtest 'check support details not shown if not enabled in cobrand' => sub {
- ok $mech->host('fixmystreet.com'), 'changed to fixmystreet';
+ ok $mech->host('www.fixmystreet.com'), 'changed to fixmystreet';
$report->interest_count(1);
ok $report->update, 'updated interest count';
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index d687b4903..10b8c5869 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -1154,7 +1154,7 @@ for my $test (
subtest 'user title not reset if no user title in submission' => sub {
$mech->log_out_ok;
- $mech->host( 'fixmystreet.com' );
+ $mech->host( 'www.fixmystreet.com' );
my $user = $mech->log_in_ok( 'userwithtitle@example.com' );