aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/admin.t')
-rw-r--r--t/app/controller/admin.t22
1 files changed, 15 insertions, 7 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index 1ab0cb488..5f8abe5a6 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -1,9 +1,7 @@
use strict;
use warnings;
use Test::More;
-use LWP::Protocol::PSGI;
-use t::Mock::MapIt;
use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
@@ -148,7 +146,7 @@ subtest 'check summary counts' => sub {
# This override is wrapped around ALL the /admin/body tests
FixMyStreet::override_config {
- MAPIT_URL => 'http://mapit.mysociety.org/',
+ MAPIT_URL => 'http://mapit.uk/',
MAPIT_TYPES => [ 'UTA' ],
BASE_URL => 'http://www.example.org',
}, sub {
@@ -208,7 +206,7 @@ subtest 'check contact creation' => sub {
subtest 'check contact editing' => sub {
$mech->get_ok('/admin/body/' . $body->id .'/test%20category');
- $mech->submit_form_ok( { with_fields => {
+ $mech->submit_form_ok( { with_fields => {
email => 'test2@example.com',
note => 'test2 note',
non_public => undef,
@@ -220,7 +218,18 @@ subtest 'check contact editing' => sub {
$mech->content_contains( 'Private: No' );
$mech->get_ok('/admin/body/' . $body->id . '/test%20category');
- $mech->submit_form_ok( { with_fields => {
+ $mech->submit_form_ok( { with_fields => {
+ email => 'test2@example.com, test3@example.com',
+ note => 'test3 note',
+ } } );
+
+ $mech->content_contains( 'test2@example.com,test3@example.com' );
+
+ $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',
@@ -580,7 +589,6 @@ foreach my $test (
}
FixMyStreet::override_config {
- MAPIT_URL => 'http://mapit.mysociety.org/',
ALLOWED_COBRANDS => 'fixmystreet',
}, sub {
@@ -1190,6 +1198,7 @@ my %default_perms = (
"permissions[report_instruct]" => undef,
"permissions[contribute_as_another_user]" => undef,
"permissions[contribute_as_body]" => undef,
+ "permissions[view_body_contribute_details]" => undef,
"permissions[user_edit]" => undef,
"permissions[user_manage_permissions]" => undef,
"permissions[user_assign_body]" => undef,
@@ -1203,7 +1212,6 @@ my %default_perms = (
FixMyStreet::override_config {
MAPIT_URL => 'http://mapit.uk/',
}, sub {
- LWP::Protocol::PSGI->register(t::Mock::MapIt->run_if_script, host => 'mapit.uk');
for my $test (
{
desc => 'edit user name',