aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-11-07 10:20:14 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-11-07 10:20:14 +0000
commita26652ec2383d81eb9649e9d5b90485e574ccd55 (patch)
tree3cc7c022018506a71719c7600a53ba59f097bd53 /t/app/controller/admin.t
parentb811bbb9571e58108d1bad3dbe995b4780b086f9 (diff)
Fix issue editing user previously lacking a name.
The check that a name was entered was testing the user's current name, not the name entered in the form.
Diffstat (limited to 't/app/controller/admin.t')
-rw-r--r--t/app/controller/admin.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index e6a8a34cf..b4fb54686 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -1325,6 +1325,10 @@ my %default_perms = (
trusted_bodies => undef,
);
+# Start this section with user having no name
+# Regression test for mysociety/fixmystreetforcouncils#250
+$user->update({ name => '' });
+
FixMyStreet::override_config {
MAPIT_URL => 'http://mapit.uk/',
}, sub {
@@ -1332,7 +1336,7 @@ FixMyStreet::override_config {
{
desc => 'edit user name',
fields => {
- name => 'Test User',
+ name => '',
email => 'test@example.com',
body => $haringey->id,
phone => '',